Jump to content

croatiankid

Members
  • Posts

    332
  • Joined

  • Last visited

Posts posted by croatiankid

    Valid?

    This is the smallest though:

    body{background:#006000;color:#0E0}h1{color:#0E0;text-decoration:underline;background:#006000}hr{width:65%;color:#0C0;background:#006000}h1.center{margin:0 auto;text-align:center}

  1. here's a valid and optimized version of the code above:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><title>untitled</title><style type="text/css">* {margin:0;padding:0}#container {margin:0 auto;width:780px}#left,#right {float:left}#left {width:30%;border:1px solid #f00}#right {width:70%;border:1px solid #00f}</style><div id="container"><div id="left"></div><div id="right"></div></div>

  2. for now you should not put ANYTHING before a doctype (no whitespace, no blank line, no comment, no xml tag, nothing), because doing so will activate internet explorer's quirk mode of rendering, giving you unpredictable layout results across browsers.

×
×
  • Create New...