/    Sign up×
Community /Pin to ProfileBookmark

DIV problems in Firefox.

This is my site: [URL=”http://goodbyealice.com”]http://goodbyealice.com[/URL].

If you look at it in IE, it looks like I want it to. The background is grey, and the container DIV that holds everything has a white background.

In FF however, the white background doesn’t go further down than the header image, it doesn’t go to the bottom of the page like in IE, and I don’t understand why. It holds all the other divs, so it should stretch with the others, right?

This is my CSS:

[code]
#container {
margin: 0px auto;
width: 700px;
height: auto;
background-image:url(‘http://goodbyealice.com/wp/img/bg.jpg’);
background-repeat: repeat-y;
background-color:#ffffff;
padding: 25px;
padding-top: 0px;
}

.layout{
position: relative;
left: -65px;
}

.blog{
width: 450px;
text-align: left;
float: right;
position: relative;
top: -100px;
}

.side {
width: 195px;
float: left;
text-align: justify;
position: relative;
left: 15px;
top: -30px;
}[/code]

The page structure is:

CONTAINER DIV

  • LAYOUT HEADER PIC

  • – SIDEBAR DIV (aligned right with float)


  • – CONTENT DIV (aligned left with float)

  • /DIV

    I tried everything I could think of (which admittedly isn’t much), and when I take out the ‘float’ from the blog/side div, it works – but I need it to align the divs. It also works if I assign a height in pixels to the container, but that’s not really a solution..

    Help?

    to post a comment
    CSS

    12 Comments(s)

    Copy linkTweet thisAlerts:
    @CentauriJan 15.2007 — As both your content divs are floated, they are taken out of the document flow - therefore #container DOESN'T actually contain the elements. Firefox does it right, IE is wrong. You need to clear the floats. One method is to add overflow: hidden; to the #container css.

    Cheers

    Graeme
    Copy linkTweet thisAlerts:
    @drhowarddrfineJan 15.2007 — As Centauri says, this is a bug in IE and should NOT be extending as you have it written now.

    Never, ever use IE as the 'correct' view. IE is old, buggy and non-standard; including the 'new' IE7. For example, while your page may look as you wish in IE, your code contains 121 errors. This means you can't rely on any other browser to proper display your page because errors in code cannot be reliably counted on to be the same between programs.
    Copy linkTweet thisAlerts:
    @lynn168authorJan 15.2007 — Oh, I know that FF is right, that IE just ignores errors and that the coding contains errors. Some I did myself I guess, and some were in the Wordpress theme I downloaded. The problem is that I'm not sure how to correct most of the errors the validator shows.

    Anyway, the overflow: hidden works, so thanks a lot for that. I'm not sure how (I thought it hides the content that overflows the size of the div?), but I'm just happy it works. ?
    Copy linkTweet thisAlerts:
    @nazukeoyaDec 03.2008 — I'm using Dreamweaver CS3 and i changed the overflow to hidden on my ap div but that did not help the alignment issue im having in firefox.

    any idea on what i need to do in Dreamweaver CS3?
    Copy linkTweet thisAlerts:
    @nazukeoyaDec 03.2008 — hey any idea on how to make the overflow:hidden solution work in Dreamweaver CS3?

    i added it to my css rules via Dreamweaver but nothing changed. the alignment is still off in firefox with my ap divs.
    Copy linkTweet thisAlerts:
    @nazukeoyaDec 03.2008 — As both your content divs are floated, they are taken out of the document flow - therefore #container DOESN'T actually contain the elements. Firefox does it right, IE is wrong. You need to clear the floats. One method is to add overflow: hidden; to the #container css.

    Cheers

    Graeme[/QUOTE]


    hey any idea on how to make the overflow:hidden solution work in Dreamweaver CS3?

    i added it to my css rules via Dreamweaver but nothing changed. the alignment is still off in firefox with my ap divs.

    also, how do i clear the floats in Dreamweaver CS3 so that it fixes this issue?
    Copy linkTweet thisAlerts:
    @CentauriDec 03.2008 — Huh? - you reply to a thread that is nearly 2 years old with your own question (short on details)?

    If "ap div" means an absolutely positioned div, then nothing will force a container to surround them. Absolutely positioned elements are taken completely out of the document flow, and they cannot affect the positioning or size of anything else, nor can anything else affect them. Absolute positioning should only be used for special effects where you want things to overlap, and should not be used as a general positioning scheme.
    Copy linkTweet thisAlerts:
    @nazukeoyaDec 03.2008 — Huh? - you reply to a thread that is nearly 2 years old with your own question (short on details)?[/QUOTE]

    yep. so what is the solution to my problem?
    Copy linkTweet thisAlerts:
    @CentauriDec 03.2008 — yep. so what is the solution to my problem?[/QUOTE]

    The solution is to NOT use absolute positioning.
    Copy linkTweet thisAlerts:
    @nazukeoyaDec 03.2008 — The solution is to NOT use absolute positioning.[/QUOTE]

    Don't be an @ss. I asked a simple question, no need to be smart with me. If you're not going to be constructive in a forum meant for helping folks, then stay out of here.
    Copy linkTweet thisAlerts:
    @CentauriDec 03.2008 — For a new poster you are going the right way about getting a ban......

    As I explained above, absolute positioning takes the element out of the document flow. Once this happens, it can have [B]NO[/B] influence over any other object on the page. If you don't absolutely position, but rather use the default positioning method of "static", placing the object with margins, padding and/or floats, then these problems don't occur - let the objects on the page stack naturally. Like building a house, you don't put the roof at a specific location and try and fit walls under it - the position of the roof is determined by the size of the walls, the position of which is determined by the floor, the position of which is determined by the foundations. A website is similar, with the "ground" and "gravity" towards the top left corner.
    Copy linkTweet thisAlerts:
    @nazukeoyaDec 04.2008 — Thank you. That makes a whole lot more sense to me.

    You sounded as if you were talking down to me in your previous posts, that is why I said what I said. And it was deserved.
    ×

    Success!

    Help @lynn168 spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.18,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...