Cell width error when containing variable width content

Discussion in 'HTML' started by mj.redfox.mj@gmail.com, Jan 26, 2006.

  1. Guest

    I have a table of width 100%, with one row and two columns.

    The first column is a fixed 150 pixel width and contains text.

    The second column has no width set, so that it just fills the rest of
    the table width.

    It contains a select box, which has a style attribute as follows:
    style="width: 60%"

    However, as it stands, this results in the second cell not displaying
    at all, as (I'm assuming) the width of the select box is being treated
    as 60% of 0, rather than 60% of the remainder of the table.

    Interestingly, if I add a single character after the select box (i.e.
    something with a finite width), the cell displays as expected.

    Does anyone know if there's a better practice way around this, rather
    than adding unneccessary characters every time I want to do this?

    Thank you if you can help at all.
    , Jan 26, 2006
    #1
    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. AndrewF
    Replies:
    1
    Views:
    744
    Bruce Barker
    Oct 10, 2005
  2. hazz
    Replies:
    6
    Views:
    49,433
    SkyUCHC
    Jun 9, 2010
  3. Lo?c Mah?
    Replies:
    2
    Views:
    1,664
    Lo?c Mah?
    Nov 29, 2004
  4. ssk
    Replies:
    5
    Views:
    5,465
    Jukka K. Korpela
    Oct 30, 2006
  5. JC

    textbox height = containing cell height - x

    JC, Jul 29, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    171
    DujHoD
    Aug 2, 2004
Loading...

Share This Page