• hello.

    wondered if anyone could provide direction on how to set widths of individual cells in a table. basically have used a row to create a horizontal scroll effect and need to set the width of the first cell in the table to 400px.

    thought it would just be <td width=”400″> but doesn’t seem to work.

    the page in question is:

    https://thomasjwpayne.com/dbuckingham/?page_id=11

Viewing 5 replies - 1 through 5 (of 5 total)
  • I couldn’t find width=”400″ in your code.

    style=”width: 400px !important;”

    I found that though. Sometimes the width the table will effect how wide a cell can be.

    Maybe if you set the table to width=”100%” and then make sure you have at least two TD cells, so that one can compensate for the remaining width of the table.

    Thread Starter thomaspayne

    (@thomaspayne)

    yeah sorry.

    was just checking if inline css would affect it. didnt seem to do much.

    yeah there will always be multiple td cells but not sure what you’ve recommended would work, unless i’ve misunderstood.

    basically need the opening cell to always stay fixed at 400px.

    anybody?

    table-layout:fixed

    Thread Starter thomaspayne

    (@thomaspayne)

    yeah think i see what you mean now. works for the text although not for the images which end up on top of each other, even with all td’s set to width=100%.

    imagined there were be some method using css to affect only the first column so the remaining columns can be flexible depending on image width?

    Hello Thomas,

    All the TDS can only equal the 100% in total.

    If there are three TDs they need to equal 33% each. That might be causing some problems.

    A bad hack but should work fine on the newer computers is to set image widths to 100% so they scale to fit the width of the TDs.

    Tables will not clip images from what I remember. So in the worst case, you might need to wrap an image in a div and then set the width of the div to what you need it to be and then add an overflow:hidden to clip the image.

    Is that what you mean?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘table widths’ is closed to new replies.