Jump to content

Tables and widths and line breaks


DeX

Recommended Posts

I'm doing a pretty complex site for a client and it involves a lot of tables. I have some questions regarding the way they want to go with them and the way I should go according to standards.

 

1. Sometimes they'll have something in a column that flows over onto the next line at the wrong place. For example, they'll have something like:

Oversize (width x length x height)

and because of the table column spacing, it'll come out on the website as

Oversize (widthx length x height)

We need that to look more like

Oversize(width x length x height)

so what they want to do is put a <br> tag in there to force the line break where they want it, before the brackets. Is it correct to use a <br> tag or should we be using <p> tags as better programming? Is there another way to do it? Can we force the column to expand to the end of the line in the CSS instead? I need to set this globally on the site to not wrap text for certain strings.

 

2. Is there a way to set a minimum column width in the CSS? I have widths set to AUTO right now but I'd like the columns to be at least 95 pixels wide or expand as needed.

Link to comment
Share on other sites

1) You could use non-breaking spaces:

Oversize (width x length x height)

OR

 

2) you could use the whitespace property in a span tag:

Oversize <SPAN style="white-space: nowrap;">(width x length x height)</SPAN>

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

If you are going to lay out your page in tables, then you may as well not bother working about standards. It's kind of like putting racing tires on a ford fiesta.

 

You'd be surprised how many high end corporate websites have their websites done in tables.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.