Forums

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

Home Forums CSS absolute position help

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #38237
    goalieman34
    Member

    Hey everyone,
    I am looking to move a chunk of html into my header area just below my search bar using absolute positioning. Any help on this would be great.

    Here is my website:
    http://petrowest.squarespace.com/

    #103549
    goalieman34
    Member

    I have used this

    Stock Ticker

    but when i look at it with my iphone and stuff the text is out of place

    #103550
    Senff
    Participant

    As soon as you position something like that absolutely, it is removed from the document “flow”, which basically means that all other elements will kind of disregard/ignore your block and not place themselves around it.

    So, it is now ABOVE the menu. If you would move it to BELOW the menu, by keeping it absolute but just a different top coordinate, anything else on the page will not change or move. If that’s what you want — great! If not, I would advise against using position absolute.

    #103551
    goalieman34
    Member

    oh ok I see what your saying. Thanks for teaching me about that. @Senff Is there another method that you would recommend using?

    #103552
    Senff
    Participant

    Well, why don’t you just put the ticker in a div and place it in your code wherever you want it (below the navigation, above the image slider), without using position absolute?

    #103553
    goalieman34
    Member

    Ok so i created a div


    text


    and have this as the css. If i dont use absolute it does not place it in the right location.
    #stockticker { margin-top:50px; right:400px;}
    Can you show me what the css show look like

    #103554
    Senff
    Participant

    Don’t put the div right at the top of the code (right after ). Just put it where you want it to appear.

    For example, if you want it to appear right above the main menu, you need to put your div right before the line:

    If you want it to appear right above the image slider, you need to place your code right before the line:

    And so on.

    #103544
    goalieman34
    Member


    @Senff
    I am soo close to fixing it. Can you take a look at it. The stock ticker is behind my petrowest logo and I would like it moved over to under the search bar
    http://petrowest.squarespace.com/

    #103563
    goalieman34
    Member

    SOLVED

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘absolute position help’ is closed to new replies.