Grow your CSS skills. Land your dream job.

SOLVED – Absolute positioning an image or div – SOLVED

  • # December 19, 2008 at 5:07 pm

    I am having trouble with an image and z index. As far as I understand you can only use z index on an object that has absolute positioning. Also as far as I know Absolute positioned object should still be relative to it’s parent container. This does not seam to be the case with the page I am working on. The logo seams to be absolute to the browser window rather then the parent divs.

    The div I am trying to position had an id="header-img"

    My page-wrap has a specified width and is centered on the page.

    Code:

    The guy I am working for wants that image to overlap the menu a little bit.
    What do I need to do to use the z-index but still have that header image move when the page is re-sized?

    Thank a ton! May the Lord Jesus Christ show you that you need forgiveness for disobeying His commands. May he show you everlasting life though faith in Jesus Christ’s work and gift to us! Bless you in the name of the Lord.

    # December 19, 2008 at 5:48 pm

    To use z-index set the object ( IE. div, image, span… whatever your trying to control ) in the css to position:absolute;

    Now to make this move with the parent container set the parent container to position:relative;

    Bingo you should be working!

    I don’t know if it will help a ton but the video I found that explained this is here…
    http://www.youtube.com/watch?v=tXElvkyMFMQ

    The Lord Jesus Christ bless you! Seek the lord while you still can. We all will stand before Him on the day of judgment. You can stand before Him in sin and be damned to hell or seek and Receive Him now and he will grant to you forgiveness and everlasting life. Jesus Christ was sinless and became sin for us that whoever will believe in Him will not parish but have everlasting life. Jesus Christ is the way the truth and the life, No man comes to the father except though Him. Share the Gospel that others may escape the wrath to come. Repent and seek the Lord! Bless you!

    # December 19, 2008 at 9:56 pm

    As a quick note, if you need to set z-index on something but don’t want it to move from where it is necessarily, you can just apply position: relative, which will enable z-index to be used on it.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".