Cell width error when containing variable width content

M

mj.redfox.mj

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top