Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Why is this div jumping outside the wrapper?

  • This topic is empty.
Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #42814
    nixnerd
    Participant

    First off, let me say this site has been insanely helpful and it’s one of the best I’ve ever seen as far as tutorials and tips go.

    I can’t seem to figure out what I’m doing wrong here. Why is my twitter “badge/box” jumping outside the wrapper when it’s positioned inside of it? Everything else follows the rules but the twitter logo is going all “freebird” on me.

    Here is the url:

    test.elitewildlife.com

    Here is the CSS:

    .twitter_badge {
    position: absolute;
    right: 0px;
    }

    #125080
    tomrogers123
    Member

    The demo wouldn’t load for me but my gut instinct is: do you have `position: relative` on the parent container of `.twitter_badge`? If you get the demo loading, I’ll investigate in more depth.

    #125084
    Paulie_D
    Member

    Link doesn’t work for me either.

    I would also say that using position:absolute is ‘generally’ something that should only be used as a last resort.

    There are MUCH better ways of laying out your pages.

    #125087
    nixnerd
    Participant

    sorry… it’s test.elitewildlife.com

    #125088
    nixnerd
    Participant

    I know that the parent should be relative but I have a div inside a div inside a div inside a div. I’ve got generations of divs so to speak.

    Which one should be relative? The great granddaddy?

    #125089
    Paulie_D
    Member

    Ok…if you set position:absolute will take the element out of the document flow.

    If you try removing both of the properties and see what happens.

    .twitter_badge {
    position: absolute; /* takes document of of flow */
    right: 0px; /* shoves it far over to the right.
    }

    I guess the question is…where is it supposed to be?

    Are you aware of floats and how they work….that’s probably the best way to go.

    As I said…

    >using position:absolute is ‘generally’ something that should only be used as a last resort.

    #125090
    nixnerd
    Participant

    Ok. Let me play around with floats, even though I’ve never had much luck.

    I’m going to go back to basics here and see what happens. I’ll post an update when I’m through.

    Sorry to wast anyone’s time.

    #125091
    Paulie_D
    Member

    Not a waste…It’s just that we don’t know where the twitter bits are supposed to be.

    I’m guessing that they are supposed to be under the elements on the right…right?

    #125098
    nixnerd
    Participant

    The twitter badge is supposed to be directly below the email form on the right.

    Update: I tried to float it right and the same thing happens. It jumps out of the wrapper div.

    I’ve even gone through my HTML to make sure that I’m not missing a /div close tag or something stupid like that.

    Relative vs. Absolute aside, for some reason absolute positioning worked on the email form… but not the twitter badge.

    I’m really at a loss for what is going on here.

    #125100
    tomrogers123
    Member

    The problem is `#mail` need to be `position: relative` to set a context for the absolute positioning within. You can’t do this though because the container itself is set as absolute and so changing it would screw the whole thing up.

    #125106
    tomrogers123
    Member

    It’ll take some time but try to figure something out for you.

    #125107
    nixnerd
    Participant

    Yeah, it’s test.elitewildlife.com. That should work. First url posted was wrong.

    #125111
    wolfcry911
    Participant

    can’t connect to that url either…

    #125112
    tomrogers123
    Member

    Down again for me too.

    #125113
    Paulie_D
    Member

    Guess it’s offline for a while.

    >I’m going to go back to basics here and see what happens.

    I think we’ll let this one lie for a while.

    He can always post back once he’s re-evaluated.

Viewing 15 posts - 1 through 15 (of 22 total)
  • The forum ‘CSS’ is closed to new topics and replies.