SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Hybrid View

  1. #1
    SitePoint Guru adammc's Avatar
    Join Date
    Aug 2004
    Location
    Cairns, Australia
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question CSS - Displaying incorrectly in IE

    Hi guys,

    Im hoping a CSS whizz can find an error in this code as I cannot for the life of me work out why content held in the 'main' div is appearing outside / overlapping the edge of the site design?

    It loads perfectly in Firefox


    Code:
    #wrap {
    	width: 820px;
    	background: #CCC url(content.jpg) repeat-y center top;
    	margin: 0 auto;
    	text-align: left;
    }
    #content-wrap {
    	clear: both;
    	width: 760px;
    	padding: 0; 
    	margin: 10px auto;
    }
    
    
    /* Main Column */
    #main {
    	float: left;
    	width: 70%;
    	padding: 0; margin: 0 0 0 5px;
    	display: inline;
    }

    Any help would be greatly appreciated

  2. #2
    SitePoint Wizard silver trophybronze trophy Nadia P's Avatar
    Join Date
    Oct 2004
    Location
    NSW Australia
    Posts
    3,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The rest of your code would probably be helpful too, or a link to your test page.
    EDIT:

    Using your css and creating the divs, originally I didn't see any grey background and the content text seemed to be outside the box.
    However adding overflow: auto; to #wrap, seemed to fix all that. It may for you. But as I said above, it all depends on how you have written the markup.


    Nadia

  3. #3
    SitePoint Guru adammc's Avatar
    Join Date
    Aug 2004
    Location
    Cairns, Australia
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi nadia thank you for the reply
    I wasnt sure if I was allowed to post a url so I left it out

    http://www.webmastersite.com.au/new-...e_067-4110.php

  4. #4
    SitePoint Guru adammc's Avatar
    Join Date
    Aug 2004
    Location
    Cairns, Australia
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is my main page template, which loads perfectly in both IE & Firefox.
    http://www.webmastersite.com.au/new-site/

    The article page that is getting the overlapping error contains the exact same header and footer as my main page
    (just different paths to the stylesheet and images)

    Can anyone possibly help?

  5. #5
    SitePoint Wizard bronze trophy Centauri's Avatar
    Join Date
    May 2007
    Location
    Newcastle, Australia
    Posts
    3,718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    At the top of your html appears "<!--ARTICLE-->" - as this is before the doctype, it is throwing IE into quirks mode. Get rid of anything before the doctype.

  6. #6
    SitePoint Guru adammc's Avatar
    Join Date
    Aug 2004
    Location
    Cairns, Australia
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you sooooo much

  7. #7
    SitePoint Wizard silver trophybronze trophy Nadia P's Avatar
    Join Date
    Oct 2004
    Location
    NSW Australia
    Posts
    3,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you remove the comment at the top of the markup, it shows up fine in IE7
    <!--ARTICLE-->

    There is no such comment on the new link you posted - so that's probably the cause... remove the comment and see if that renders the page correctly, if not post back. I didn't have time to take a real close look at your code of css... that stuck out at me immediately. :-)

    Nadia

  8. #8
    SitePoint Wizard silver trophybronze trophy Nadia P's Avatar
    Join Date
    Oct 2004
    Location
    NSW Australia
    Posts
    3,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh bugger, should have done a refresh before I posted <lol> Centauri got it before I did... sorry for the noise :-)

    Nadia


Bookmarks

Posting Permissions

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