Categories
Friends
Links
Category Archives: CSS
How to Apply CSS styles to iPhones/iPods only
CSS @media screen and (max-device-width: 480px){ /* All iPhone only CSS goes here */ }
Basic Default CSS Print Template
CSS /* Set default width, margin, float, and background. */ body, #wrap, #content, #container, { width: 100%; margin: 0; float: none; background: #fff url(none); } /* Remove any elements not needed in print. This would include navigation, ads, sidebars, etc. */ #nav, .noprint, #footer { display: [...]
How to Change the Default Text Selection Color with CSS
HTML Example <p class="selectionBlue">Testing blue selections.</p> CSS 3 .selectionBlue::selection { background: #0000FF; /* Safari */ } .selectionBlue::-moz-selection { background: #0000FF; /* Firefox */ }
How to show/hide div with HTML and CSS only – Toggle visibility with CSS
HTML Example: <a onclick="document.getElementById(‘myDiv’).style.display=’block’;" href="javascript:void(0)">Click Here to show my div</a></div> <div class="anyclass" id="myDiv"> <p>Here goes the content you want to toggle the visibility</p> <a onclick="document.getElementById(‘myDiv’).style.display=’none’;" href="javascript:void(0)">Close [x]</a> </div>
How To Make The Whole Div Clickable with CSS Only
HTML Example: <div id="myDiv"> <a href="http://blog.fabriziomichels.com" class="clickDiv">view website</a> </div> CSS div#myDiv { width:300px; height:250px; background:url(../images/any_background_image.jpg) no-repeat; float:left; margin:0; padding:0; } .clickDiv { display:block; height:50px; text-align:center; padding:200px 0 ; }
How to rotate text with CSS
CSS .rotate { /* Safari */ -webkit-transform: rotate(-90deg); /* Firefox */ -moz-transform: rotate(-90deg); /* Internet Explorer */ filter: progid: DXImageTransform.Microsoft.BasicImage(rotation=3); }
How to Create a Lightbox/Thickbox with CSS
CSS: .black_overlay{ display: none; position: absolute; top: 0%; left: 0%; width: 100%; height: 100%; background-color: black; z-index:1001; -moz-opacity: [...]
How to align text vertically in a floating div
Posted in CSS Tagged aligh float, align, align div, align text, align vertically, CSS, float div, hack, internet explorer, vertical 2 Comments
How to Automatically Re-size Images for iPhones/ iPods