www.webdeveloper.com
Results 1 to 2 of 2

Thread: XHTML Causing Problems

  1. #1
    Join Date
    Mar 2009
    Posts
    36

    XHTML Causing Problems

    Hi Folks,

    Quick question... (This is a project not a real website for a company! Hence the naff text on there) This site looks OK without the XHTML doctype tag, but has some problems with a white line above images on the right bar and bottom bar in IE. When i add the XHTML doctype i get the same problem in FF!

    (The lines being above fairly downs, pile downs and numerous blocks in the footer).

    Additionally, any ideas why my site dosent center in IE? Thanks for any help folks.

    Regards,
    Scott

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Probably: https://developer.mozilla.org/en/Ima...ysterious_Gaps
    Need to see how you are centering and which version(s) of IE have the problem.
    Centering in all browsers (if position:absolute is not used):
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    <title>Basic centering</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    
    <style type="text/css">
    #centered {text-align:center;}
    #container {margin:0 auto; width:80&#37;; text-align:left;}
     
    </style>
    
    </head>
    <body>
    <!-- Center contents -->
    <div id="centered"><div id="container">
       <div id="contents" style="border:1px solid red;">
       	<p>contents</p>
       </div>
    </div></div>
    </body>
    </html>
    </body>
    </html>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles