Web coders: Help with HTML table

Serious Business 9 replies 329 views
T
teamcoco
Posts: 41
Feb 28, 2013 8:12pm
The attached pic is what I am trying to do: The left image is what I have now with the attached code.... the image on the right is what I want. I basically want "a and 1" etc to be in 2 different columns under their respective categories.


Html code I have right now

Devils Advocate's avatar
Devils Advocate
Posts: 4,539
Feb 28, 2013 8:30pm
Sorry.... No speak a da interwebz
hasbeen's avatar
hasbeen
Posts: 6,504
Feb 28, 2013 8:31pm
I ain't got time for this.
Belly35's avatar
Belly35
Posts: 9,716
Feb 28, 2013 9:07pm
Check your spelling :D
M
MontyBrunswick
Feb 28, 2013 9:30pm
i can't type it out on here since HTML code actually renders properly.
believer's avatar
believer
Posts: 8,153
Mar 1, 2013 2:43am
Belly35;1398130 wrote:Check your spelling MOFO :D
fixed
thePITman's avatar
thePITman
Posts: 3,867
Mar 1, 2013 8:18am
Change your "Heading" cell to colspan="4"
Change "Cat 1" and "Cat 2" to colspan="2"
Add 2 more columns in the rest of the rows, separating "a" and "1", etc.

or, if you're worried about borders and such...

Add another table inside cells "a1" and "d1" with 0 border, 2 columns each, and put the rest of the data for its respective 2 columns in there. Then remove the last 2 rows of the table.
justincredible's avatar
justincredible
Posts: 32,056
Mar 1, 2013 8:36am
thePITman;1398317 wrote:Change your "Heading" cell to colspan="4"
Change "Cat 1" and "Cat 2" to colspan="2"
Add 2 more columns in the rest of the rows, separating "a" and "1", etc.
This is the answer.
Belly35's avatar
Belly35
Posts: 9,716
Mar 1, 2013 11:18am
justincredible;1398320 wrote:This is the answer.
this
thePITman's avatar
thePITman
Posts: 3,867
Mar 5, 2013 9:22am
teamcoco;1398106 wrote:The attached pic is what I am trying to do: The left image is what I have now with the attached code.... the image on the right is what I want. I basically want "a and 1" etc to be in 2 different columns under their respective categories.
thePITman;1398317 wrote:Change your "Heading" cell to colspan="4"
Change "Cat 1" and "Cat 2" to colspan="2"
Add 2 more columns in the rest of the rows, separating "a" and "1", etc.

or, if you're worried about borders and such...

Add another table inside cells "a1" and "d1" with 0 border, 2 columns each, and put the rest of the data for its respective 2 columns in there. Then remove the last 2 rows of the table.
Did this give you what you wanted?