Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Aug 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Image Between <hr>'s

    I have about 30 links each with an <hr> separating them into 1-3 link sections. Sometimes an image accompanies one of the link sections. I want to right align that image, so I used float:right, but it doesn't work as I would like it to. The broken set-up places the image on top of the <hr> separating the next section. I want the next <hr> to follow the image, not go underneath it. How should I set this up?

  • #2
    Regular Coder Jutlander's Avatar
    Join Date
    Jun 2007
    Location
    In my own sick little world :P
    Posts
    425
    Thanks
    1
    Thanked 12 Times in 12 Posts
    Have some code we can look at?
    .
    .

  • #3
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,777
    Thanks
    6
    Thanked 1,021 Times in 994 Posts
    I suspect you didn’t clear your floats, did you?
    Code:
    hr {clear: both;}

  • #4
    New to the CF scene
    Join Date
    Aug 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    body
    {
    line-height:100%;
    margin:0px;
    padding:0px
    }

    div.top
    {
    font-size:175%;
    padding-top:10px;
    padding-bottom:25px;
    text-align:center;
    }
    div.row0
    {
    position:absolute;
    left:5px;
    width:32%;
    }

    div.row1
    {
    position:absolute;
    width:32%;
    margin-right:34%;
    margin-left:34%;
    }

    div.row2
    {
    position:absolute;
    right:5px;
    width:32%;
    }

    a
    {
    line-height:120%;
    }

    img
    {
    position:absolute;
    right:0px;
    height:auto;
    width:25%;
    margin:0 0 0 5px;
    }

    hr
    {
    width:100%;
    margin:.5em 0em .5em 0em;
    height:3px;
    color:#008;
    background-color:#008;
    }


    ---XHTML---
    basically looks like this
    <hr><img><a><a><hr>, etc, etc.

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Stephan gave you your solution.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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