Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jan 2008
    Posts
    20
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Sidebar not showing up in IE7

    Hello all.

    I recently redesigned my blog but now, I can't get my sidebar to appear in IE 7.

    The stylesheet's at http://www.ottens.co.uk/gatehouse/sy...ouse/style.css with the sidebar being the "secondary" class.

    Any help would be much appreciated! Thanks!

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello Ottens,
    It's there, it's just waaaay over to the right.
    Removing position:absolute; from it seems to work but I didn't check that in everything.
    See this site about the pitfalls of absolute positioning.

    If you really must use ap on your sidebar, make the parent container postition:relative; so your sidebar will be positioned from the parent instead of the body of your document.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    Ottens (11-02-2009)

  • #3
    New Coder
    Join Date
    Jan 2008
    Posts
    20
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Oh! I suppose I should get myself a wider screen one of these days...

    The problem with the positioning is that when I remove the "absolute" from the sidebar, it disappears in Safari. I've already set "position:relative" on my container (the "page" div), but that doesn't seem to make a difference.

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    You are using margins there for position. That's not something that goes with ap, positioning with margins is used with floats and elements that are included in the normal flow of the document.

    When you ap something, it's taken out of the normal flow... to position it, use pixel measurements from the top left corner of the relative div.
    Like this:
    Code:
    .secondary {
    	font: 12px Trebuchet MS /*'Lucida Grande', Verdana, Arial, Sans-Serif*/; 
    	padding: 5px 0 20px 0;
    	color: #666;
            line-height: 1.3em !important;
    	overflow: hidden;
    	position: absolute;
    top: 100px;
    left: 532px;
            }
    I think that will make both IE7 and Safari happy...


    Another thing you can fix, I don't see that you're styling .top anywhere...
    Just for fun, put a border on that and see where it appears.
    Code:
    .top {
    border-bottom: 5px solid #f00;
    }
    Not really what you expected, huh?
    Now try clearing your floats with this -
    Code:
    .top {
    overflow: auto;
    border-bottom: 5px solid #f00;
    }


    And last, check the links in my sig about validating. There are a few errors there that could easily be fixed.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #5
    New Coder
    Join Date
    Jan 2008
    Posts
    20
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Why, it worked! Most wonderful. Thanks very much for your help!


  •  

    Posting Permissions

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