473,385 Members | 2,162 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

<col> and <colgroup> with classes

Me again!

This time I'd like to prevent an entire column of a table to have no
word-wrapping. So I defined this class in the style sheet:

..nobr {
white-space: nowrap;
}

When I define table cells like this: <td class="nobr"> everything works
fine. But using this class for an entire column doesn't work (I don't
want the "16:00 - 18:00" part wrapped):

<table cellspacing="0" cellpadding="10" border="1">
<colgroup>
<col>
<col class="nobr">
</colgroup>
<tbody>
<tr>
<td>Montag</td>
<td>16:00 - 18:00</td>
<td> ... </td>
</tr>
</tbody>
</table>
What am I doing wrong;

--
"With me is nothing wrong! And with you?" (from r.a.m.p)
Jul 20 '05 #1
1 9494


Daniel Haude wrote:
This time I'd like to prevent an entire column of a table to have no
word-wrapping. So I defined this class in the style sheet:

.nobr {
white-space: nowrap;
}

When I define table cells like this: <td class="nobr"> everything works
fine. But using this class for an entire column doesn't work (I don't
want the "16:00 - 18:00" part wrapped):

<table cellspacing="0" cellpadding="10" border="1">
<colgroup>
<col>
<col class="nobr">
</colgroup>
<tbody>
<tr>
<td>Montag</td>
<td>16:00 - 18:00</td>
<td> ... </td>
</tr>
</tbody>
</table>
What am I doing wrong;


Probably overestimating the power of the <col> element, check what the
CSS 2 specification has to say about column elements at
http://www.w3.org/TR/CSS2/tables.html#q4
and it only lists the CSS properties
border, background, width, visibility
as those that can be applied to columns to influence table cells.
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Garmt de Vries | last post by:
I have a table listing various translations of the titles of a set of books. Each row represents a book, each column represents a language. It looks like this: ...
1
by: Rob Meade | last post by:
Hi all, I recently read a book regarding improving the performance of web pages loading, one of the suggestions was to add <colgroup> and the relevant <col> tags with information such as cell...
36
by: Roedy Green | last post by:
The only browser I have encountered that supports <colgroup><col class="behold"></colgroup> to apply a CSS style to a whole column, is Microsoft Internet Explorer. I have been told it SHOULD NOT...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.