Forums

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

Home Forums CSS what is the procedure for this?

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

    I have a box that is 400px by 300px, I have two ul lists in the box. I want them side by side. So I do #listOne and #listTwo,
    I put position: abslolute; on both, and listOne is top: 0; left: 0; listTwo is top: 0; right: 0;. Ok, so now both lists are sitting next to each other. One on the right and the other on the left. Perfect, that’s exactly what I wanted. So now, Underneath the two lists, I want a paragraph of text. But since the list have absolute positioning on them, the text won’t sit underneath them. It instead sits on top of them. I know I can wrap another few divs around the list for positioning, But I was wondering what the preferred coding method is. Is there a web standard for this issue?

    #68557
    TheDoc
    Member

    <div class="box">

    <ul style="float:left;">
    <li>asdf</li>
    </ul>

    <ul>
    <li>asdf</li>
    </ul>

    <div style="clear:both;"></div>

    <p>paragraph</p>

    </div><!–close box–>

    This is what I would do… minus the inline styles of course.

    #68558
    TheDoc
    Member

    On second thought, you could just apply the clear to the <p> tag itself.

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