Global White Space Reset (CSS/html)
This may not be useful to many people, but I thought it was interesting. If you do web design and use css you’ll probably like this… I found this post at leftjustified.net about a neat way to “reset” the padding and margin css information which can help for designing sites to display the same when using CSS. Unfortunately, many browsers have little quirks in displaying css, maybe they have strange default settings which cause css placement to look, well, strange, from one browser to another… in comes this little trick…
1. * {
2. padding:0;
3. margin:0;
4. }
Simple, elegant and effective reset of padding and margin information. They take it a bit further though…
Here’s another example
1. * {
2. padding:0;
3. margin:0;
4. }
5. body {padding:5px;}
6. h1, h2, h3, h4, h5, h6, p, pre, blockquote, form, label, ul, ol, dl, fieldset, address { margin:20px 0; }
7. li, dd, blockquote { margin-left: 40px; }
8. fieldset { padding:10px; }
Nice, but it has fixed px placement – what if someone resizes the browser or changes fontsize???
1. * {
2. padding:0;
3. margin:0;
4. }
5. h1, h2, h3, h4, h5, h6, p, pre, blockquote, label, ul, ol, dl, fieldset, address { margin:1em 5%; }
6. li, dd { margin-left:5%; }
7. fieldset { padding: .5em; }
Very nice… very fluid and very consistent rendering. The link above has example pages to browse as well. This is one of the nicest css tips I think I’ve seen.
Popularity: 1% [?]
Related Posts - Exploits a plenty - IE / Excel (Firefox?) There are a number of vulnerabilities that are currently unpatched, but have working publicly known exploits for Excel (*2) and Internet Explorer (2 vulnerabilities here as well.) Proof of Concept code has been released for both the Excel and Internet Explorer vulnerabilities. This means, with the code publicly available, it......
- Creating a redirect page This is one that comes in handy a lot. Like many things in computing there are a number of ways to accomplish this. My favorite though is one fo the simplest. But first, it's probably worth asking why you would want a redirect page and just clarify what I mean.......
- Wordpress 2.0 getting close I see in the dashboard that the third and (last?) release candidate for Wordpress 2.0 is officially out. There is word that the final may come Wednesday or Thursday of this week. I haven't had much time to see what features may be new... but if possible I may try......
Related Websites - A Web Hosting Business Can Make The Difference Between Achievement And Failure A world wide web hosting business needs to be capable to provide numerous innovative characteristics such as high-end hosting to leverage the very best in technological developments and ought to be able to provide diverse hosting methods. It should be possible for customers to take benefit of their own diverse......
- Retain Reputable Inexpensive Web hosting in Web 2.0 (submitted 2011-10-28) Web internet hosting services contain permitting individuals to obtain their internet websites around the Globe Wide Net. Net hosting suppliers provide reasonably priced net style internet hosting services supplying information center along with colocation, therefore assisting a web site to garner an excellent......
- What To Keep in Mind When Selecting a Web Host in Web 2.0 (submitted 2011-10-29) When all is smooth with your business site, you never think about your host - the opposite is very true, as well. Nothing is worse than trusting your host, not checking on it, and then find out your down-time is unacceptable.Many of the......
Similar Posts
- Google Search Boxes
- The D-Link DWL-800AP+ as a wireless repeater to extend wireless range – Part 2
- Black backgrounds use less power?
- OpenOffice 3 officially released
- Linksys BEFW11S4 ver. 4 wireless router locking up (default password and hard reset info too)