SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Evangelist cgacfox's Avatar
    Join Date
    Feb 2005
    Location
    Colorful Colorado
    Posts
    412
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Need help with positioning of images one on top of the other

    Hi again,

    Still working on redoing my jewelry site. I have a page where I want 2 images stacking. http://www.foxdencreations.com/new_site/lanyards.html. Towards the bottom. I am not sure how to accomplish this. I have tried using divs, adding an extra <p></p>, and the famous <br>...way too many of them. How can I achieve the stacking for the 2 images? I don't want to use tables. I guess that I could use rows for those sections. Any help would be appreciated. Thanks.

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,481
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    HI,

    Did you mean this?

    Code:
    .lftF { clear: left}
    .rtF { clear: right}

  3. #3
    SitePoint Evangelist cgacfox's Avatar
    Join Date
    Feb 2005
    Location
    Colorful Colorado
    Posts
    412
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    That worked. Thank you so much. I do have a question though so I can understand better what is going on. Why am I clearing? I added the css code to the .lftF and .rtF just below the float: left or right.

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,481
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by cgacfox View Post
    Why am I clearing?
    When you float something it will float to the right or left as far as it can. If you float one item left it floats left; and if you float two or more items they will all float left assuming there is room for them to do so.

    If you float left and then say clear:left at the same time then each float that you float to the left must avoid (clear) any floats to its left and therefore stack in a column (and vice versa for right floated elements).

    Does that make sense?

  5. #5
    SitePoint Evangelist cgacfox's Avatar
    Join Date
    Feb 2005
    Location
    Colorful Colorado
    Posts
    412
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Sorry for not answering this sooner. This does make sense now. I appreciate your sharing your knowledge with me and helping me become a better web designer.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •