Liquid widths

Discussion in 'HTML' started by Yehuda Katz, Feb 8, 2006.

  1. Yehuda Katz

    Yehuda Katz Guest

    I need a way to have the width of a div automatically equal the inner
    content.

    My HTML:

    <div class="botstrip" id="aboutstrip" style="display: none;">
    <a href="#">About 1</a><p>|</p><a href="#">About 2</a><p>|</p><a
    href="#">About 3</a></div>

    My CSS:

    div#pagewrapper div.botstrip a {
    padding-left: 10px;
    padding-right: 5px;
    color: #091A86;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: normal;
    text-decoration: none;
    }

    div#pagewrapper div.botstrip p {
    padding: 0;
    margin: 0;
    display: inline;
    }

    I set the display: none because I will unhide it later.

    In Firefox, it works perfectly, and the <div> is only as wide as the
    containing elements. In Internet Explorer, the <div> expands to the
    width of the container.When I try to set width: 0px, which would
    normally work, it breaks up the containing elements onto separate
    lines.

    Thoughts?
    Yehuda Katz, Feb 8, 2006
    #1
    1. Advertising

  2. Yehuda Katz

    Neredbojias Guest

    With neither quill nor qualm, Yehuda Katz quothed:

    > I need a way to have the width of a div automatically equal the inner
    > content.


    Normally a div does not expand to its content. Use a table.

    --
    Neredbojias
    Contrary to popular belief, it is believable.
    Neredbojias, Feb 9, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Samuël van Laere

    html forms and liquid designs

    Samuël van Laere, Jun 25, 2003, in forum: HTML
    Replies:
    4
    Views:
    3,258
    combs1945
    Jun 27, 2011
  2. David Dorward

    Re: META - Liquid design and text size

    David Dorward, Jun 25, 2003, in forum: HTML
    Replies:
    0
    Views:
    893
    David Dorward
    Jun 25, 2003
  3. Chris Beall
    Replies:
    7
    Views:
    1,175
    kchayka
    Jul 2, 2003
  4. Replies:
    0
    Views:
    507
  5. jenny wilkinson
    Replies:
    0
    Views:
    615
    jenny wilkinson
    Mar 20, 2013
Loading...

Share This Page