skip to content
  • Eric Meyer has done it again (yes I’m a cult follower). It was awesome to sit through the live walk through of most of the principles that Eric presented in his final version.

    What Eric has decided to do with the support of many interested participants is create a baseline for many of the HTML elements that behave inconsistently from browser to browser. The result being a fantastic snippet of code that removes the subtleties that often cause anomalies in the render of pages in Internet Explorer 6/7 (and in other browsers too).

    For those that just want to see the code:

    html, body, div, span, applet, object, iframe,
    h1, h2, h3, h4, h5, h6, p, blockquote, pre,
    a, abbr, acronym, address, big, cite, code,
    del, dfn, em, font, img, ins, kbd, q, s, samp,
    small, strike, strong, sub, sup, tt, var,
    dl, dt, dd, ol, ul, li,
    fieldset, form, label, legend,
    table, caption, tbody, tfoot, thead, tr, th, td {
    	margin: 0;
    	padding: 0;
    	border: 0;
    	outline: 0;
    	font-weight: inherit;
    	font-style: inherit;
    	font-size: 100%;
    	font-family: inherit;
    	vertical-align: baseline;
    	background: transparent;
    }
    /* remember to define focus styles! */
    :focus {
    	outline: 0;
    }
    body {
    	line-height: 1;
    	color: black;
    	background: white;
    }
    ol, ul {
    	list-style: none;
    }
    /* tables still need 'cellspacing="0"' in the markup */
    table {
    	border-collapse: collapse;
    	border-spacing: 0;
    }
    caption, th, td {
    	text-align: left;
    	font-weight: normal;
    }
    blockquote:before, blockquote:after,
    q:before, q:after {
    	content: "";
    }
    blockquote, q {
    	quotes: "" "";
    }
    

    You can see that nearly every element is considered above and is “reset” to values to provide sure bedrock for styling a document.

    I suppose I should go to mention another great tip from Eric, while on the topic of consistency and this one points to to consistency between the CSS “functionality” of internet explorer 6 and internet explorer 7. Dean Edwards put together great javascript code which enables coders to focus on CSS production for IE 7 and not have to worry support for behavior that doesn’t exist in IE 6 — definitely worth a look.

This entry was posted on Tuesday, May 1st, 2007 at 11:40 pm and is filed under CSS / Markup / Code. You can follow any responses to this entry through the RSS 2.0 feed.


    Comments are closed.
    February 7, 2011 92

    Optimize the Performance of Widgets, Buttons & More

    Too much 3rd Party content can slow down the growth of your site, reduce engagement, conversions and more. Learn how you can still incorporate widgets, plugins etc and still have a site that does not force your visitors to leave and never return.

    View
    March 9, 2009 71

    Do's and Don'ts to Improve Google Ranking

    Google Ranking Factors, The Good and the Bad. There are lots of opinions on how Google actually ranks your web site in the search result pages — take a closer look at what matters and why.

    View
    February 25, 2008 76

    Get Your Blog Google Ranked in 30 Days or Less

    Blogs are great for updating content quickly, creating a site community, and they even make search engines happy. Unfortunately, many site owners mis-use or under-utilize their blogs so here are 50 tips to boost your blogs performance.

    View

    Testimonials

    My custom wordpress theme came out as I described to a T. It's perfect!

    Neil Patel, QuickSprout