DeX Posted October 1, 2010 Share Posted October 1, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/214913-tables-and-widths-and-line-breaks/ Share on other sites More sharing options...
Hybride Posted October 2, 2010 Share Posted October 2, 2010 Not sure about a, but b you can do min-width: 95px Quote Link to comment https://forums.phpfreaks.com/topic/214913-tables-and-widths-and-line-breaks/#findComment-1118420 Share on other sites More sharing options...
Colton.Wagner Posted October 5, 2010 Share Posted October 5, 2010 I would try to use the nowrap function: nowrap="nowrap" Simply place that within the <td> tab. You could also try the css version: Overflow: visible; I hope I could be some assistance. Thanks, Colton Wagner Quote Link to comment https://forums.phpfreaks.com/topic/214913-tables-and-widths-and-line-breaks/#findComment-1119121 Share on other sites More sharing options...
DavidAM Posted October 5, 2010 Share Posted October 5, 2010 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> Quote Link to comment https://forums.phpfreaks.com/topic/214913-tables-and-widths-and-line-breaks/#findComment-1119161 Share on other sites More sharing options...
DeX Posted October 22, 2010 Author Share Posted October 22, 2010 That's great, thanks guys. I also found out I can use some <nobr></nobr> tags though this isn't W3C compliant. Quote Link to comment https://forums.phpfreaks.com/topic/214913-tables-and-widths-and-line-breaks/#findComment-1125059 Share on other sites More sharing options...
haku Posted October 22, 2010 Share Posted October 22, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/214913-tables-and-widths-and-line-breaks/#findComment-1125270 Share on other sites More sharing options...
DeX Posted October 30, 2010 Author Share Posted October 30, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/214913-tables-and-widths-and-line-breaks/#findComment-1128507 Share on other sites More sharing options...
haku Posted October 31, 2010 Share Posted October 31, 2010 You'd be surprised how many high end corporate websites are crap on the backend. Quote Link to comment https://forums.phpfreaks.com/topic/214913-tables-and-widths-and-line-breaks/#findComment-1128552 Share on other sites More sharing options...
fortnox007 Posted November 1, 2010 Share Posted November 1, 2010 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. yep that looks crappy rather have a lambourgini Quote Link to comment https://forums.phpfreaks.com/topic/214913-tables-and-widths-and-line-breaks/#findComment-1129003 Share on other sites More sharing options...
haku Posted November 1, 2010 Share Posted November 1, 2010 Gotta admit, that's a pretty slick looking Fiesta Quote Link to comment https://forums.phpfreaks.com/topic/214913-tables-and-widths-and-line-breaks/#findComment-1129049 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.