Questions tagged [colgroup]

Relating to HTML, the colgroup represents a group of columns in an HTML table.

Description

In HTML - <colgroup> element defines a group of columns within a table and allows to set attributes that might otherwise have to be set at <col> level on a number of col elements simultaneously — the attributes defined at this higher level apply to all of the child columns.

References

  1. W3C Specification
  2. colgroup - MDN Link
35 questions
1
vote
1 answer

Splitting a table into bordered groups with the colgroup and col elements

Using a combination of CSS and plain HTML, I am trying to get a table that has 3 groups of columns. I only want the groups to have vertical rules: Here is what I have so far: colgroup col { border-left: 1px solid #ccc; border-right: 1px…
Steve
  • 14,401
  • 35
  • 125
  • 230
1
vote
1 answer

IE ignores one col's width if there is no unspanned cell

My problem is quite easily demonstrated: …
BurninLeo
  • 4,240
  • 4
  • 39
  • 56
1
vote
4 answers

Jquery .Toggle() based on colgroup col id

fiddle is here. I am having trouble grabbing the actual column by the colgroup's col id to toggle it. I have the index correctly matched, but I do not understand how I can use the power of the colgroup to grab the entire column. Here is my…
chris Frisina
  • 19,086
  • 22
  • 87
  • 167
1
vote
1 answer

w3c's colgroup example invalid?

I know that you can't use text-align in CSS on colgroup, however, in the HTML 4.01 spec an example table is given using align="center". However, I can't seem to get their exact code to work (checked in moz and webkit)!? Should I care to request a…
Daniel
  • 782
  • 2
  • 6
  • 24
0
votes
0 answers

Is there a way to see that a Colgroup Col changed the width of a td in Chrome Developer Tools?

Is there a way to see in the Chrome Developer tools that the width of a td element is set by a colgroup? Some explanation: I was just trying to change the styling of a huge HTML table that I didn't create or style. There was one TD element in the…
Sandra
  • 765
  • 3
  • 10
  • 20
0
votes
1 answer

How do I get styles (besides background-color) working on colgroup?

I can't get any style except background-color to work on a colgroup or col. I've tried both Chrome and Firefox. I've tested this eight ways to Sunday and also googled it every way I can think of. Is that correct, its not supported in current…
Martin Moops
  • 175
  • 3
  • 14
0
votes
0 answers

What is the purpose of the colgroup tag?

What is the purpose of the colgrouptag that isn't completely superceded by the col tag? I thought it should be possible to set common style properties across a column group with the colgroup tag and then use col to set individual style properties…
NetMage
  • 26,163
  • 3
  • 34
  • 55
0
votes
2 answers

Colgroup tag not working in IE8

I am trying to create a data table, where I am facing few issues with styling. 1) I am trying to apply alternating row to TR which is not firing. Is there any way to apply the alternating style without passing the class to all the TD's with in each…
Ravi
  • 4,015
  • 7
  • 30
  • 35
0
votes
1 answer

How to use col and rowspan at the same time?

I'm trying to replicate this table: I have trouble with the third table head, I don't know how to make that double row and those 5 columns and how to do the table rows and table data to make it fit the head. I never used colgroup and rowspan before,…
0
votes
2 answers

overflow:hidden not working in colgroups for very long cells

I have searched for quite a bit in stackoverflow and google. But failed to find a solution. I have a 11 column table, of which the first column can get long text (without spaces). I have adapted to colgroup approach but it is not working for…
tt_pre
  • 147
  • 8
0
votes
1 answer

HTML Table nested selectors

I want to select a certain cell from within a colgroup and can't figure out how. Below is an example: table { position:relative; top:50px; margin:0 auto; border-collapse:collapse; } td, th { border:1px solid black; …
Bogdan Prădatu
  • 325
  • 5
  • 15
0
votes
1 answer

HTML col class selector

I am having problems getting my class selector .table-heading-column working in my CSS. I have ran this through the validator, and neither my HTML or CSS have errors. I have exhausted all fixes I can come up with. I am new to HTML so without any…
Pustafix
  • 21
  • 5
0
votes
1 answer

A table row was 1 columns wide, which is less than the count established by the 1st row(4)

Although this question has already appeared in this forum, it does not address my particular problem because my columns were specifically defined inside the table row element. I've tried using colgroup and colspan and each addition causes more…
swydell
  • 1,962
  • 8
  • 31
  • 44
0
votes
1 answer

Show nonexistent table cells

Problem: Every table cell of my two-column table needs to be 50% wide, but normal cell rules don't apply when there's a single-cell table, it takes on the 100% because the table is 100%. My CSS looks like this: .mytable{ width: 100%; } .mytable tr…
rlb.usa
  • 14,942
  • 16
  • 80
  • 128