Forums

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

Home Forums CSS text not floating on top of image

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #236538
    greenhousegraphix
    Participant

    Good Morning,

    I created a sample page here: http://www.beautifulfaucets.com/CategoryPage2.HTML

    You’ll see that in this page, the Bathroom Fixtures text overlays the image.

    Basic structure:

    Bathroom Fixtures

    [additional code here]

    the class catDescription has an absolute position applied to it.
    .catDescription {
    position: absolute;
    top: 30%;
    left: 0;
    text-align: center;
    width: 100%;
    background:none;
    opacity: 1.0;
    text-shadow: 1px 1px 1px #000;
    }

    My sample page was applied to a live site: http://mountain3.myplumbingshowroom.com/Landingpage.HTML

    On this second page, the Bathroom fixtures position is relative to the page rather than the enclosing div. Any ideas why?

    #236539
    Paulie_D
    Member

    Because you forgot to apply position:relative to the parent

    .catWrapper {
        position: relative;
    }
    
    #236541
    greenhousegraphix
    Participant

    HI Paulie,
    Thank you very much.
    Amy

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