2

I have this table: http://jsfiddle.net/fere_tzau/7pwn48zf/ . What I want to resolve is : keep a table-layout: fixed property but add a fixed value to the first col <col width="100"> .

If I add a fixed value to the <col> this will have some sort of percent width.(Calendar blocks courses should always have a fixed width, lets say 150px ).

But by using the table-layout:auto the fixed width works. ( but my table looks messed up ).

I want the first <col> to be fixed in width.

Maybe this answer is already here but I cant find it, maybe what I want is not even possible.

Thanks.

zanu
  • 21
  • 5
  • The code looks quite messy. why do you want to keep so many `` tags? – Vibhor Dube Jun 25 '15 at 13:13
  • Ignore the cols , those will be generated from js (the timeline will be dynamic ) Maybe we will show 2 years, and we need to show the courses span ( eg 5 mar > 18 Jun )... – zanu Jun 25 '15 at 13:30
  • Still unable to get your question clear. As I understand, you are trying to make a graphical interface kind of table which will depict a timeline of something around the year. Please elaborate your question. – Vibhor Dube Jun 25 '15 at 13:34
  • >>> What I want to resolve is : keep a table-layout: fixed property but add a fixed value to the first col <<< Is this not clear enough ? I need a fixed but the table property "fixed" :) – zanu Jun 25 '15 at 14:05

1 Answers1

0

You can use tr > :first-child {width:100px;} to select only the first column cells and apply a width or other attribute.

IMI
  • 2,461
  • 1
  • 14
  • 20