How do I get a graphic to "stick" to the right margin??

Discussion in 'Web Design and Development' started by emaja, Mar 12, 2006.

  1. emaja macrumors 68000

    Joined:
    May 3, 2005
    Location:
    Chicago, IL
    #1
    I am stuck. I am new to Dreamweaver - and web design in general - and can't get this to work.

    What I want in the masthead is two graphics on the same level, one tied to the left side and another to the right side, so that when a user resizes the page the graphics stretch the page. The whole page works fine and I have a "utility" division in the top part of the masthead that does this, but when I try to add a second graphic, it stay exactly where I put it and does not move.

    I have tried two layers, but nothing seems to do what I want it to do.

    Do I need to insert two divisons, side by side to get this to work? I have tried that, but it does not seem to work for me.

    Be gentle, oh web pros...
     
  2. chaos86 macrumors 65816

    chaos86

    Joined:
    Sep 11, 2003
    Location:
    127.0.0.1
    #2
    look at the properties of the layers. i dont know how DW does it, but somewhere in the code there should be CSS defining the position of the layers.

    <style type="text/css">
    #id {
    left: 5px;
    }
    </style>

    that puts the layer 5 pixels from the left edge of the document, but if you change the 'left' to 'right', it will position the layer 5 px from the right hand side of the document.

    hope that helps
     
  3. chaos86 macrumors 65816

    chaos86

    Joined:
    Sep 11, 2003
    Location:
    127.0.0.1
    #3
    p.s. i dont know how dreamweaver does it, they might put the style stuff in the DIV, instead of in its own style sheet like above.

    if its style is defined in the div tag it would look like this

    <div style="right: 5px;">
     
  4. emaja thread starter macrumors 68000

    Joined:
    May 3, 2005
    Location:
    Chicago, IL
    #4
    That was it. I added a new layer and made its position "absolute" and 20 pixels in from the right and it worked perfectly.

    Like I said, I am new to all this. Thanks for the help.
     
  5. chaos86 macrumors 65816

    chaos86

    Joined:
    Sep 11, 2003
    Location:
    127.0.0.1
    #5
    no problem mate.
     

Share This Page