I need to create a layout for tabular data. As a designer, it's been hammered into my skull that tables should not be used for anything other than tabular data. The layout should be flexible and easy to style without the use of inline styles anywhere. Is there an ideal/semantic way to go about doing this?
1.] you do not need to declare class .table 2.] empty TD and class blank, for what ?
3.] CSS obvious first sight repetition a] things that have common settings can be group (not declared 3 times the same) b] then you write only stuff that differs c] ussing classes on TD is good for IE 6,7,8 which ignores E:nth-child
result = less verbose code, which is shorter, easy to use and read
@krysak4ever, nice, thanks. 2.] empty TD and class blank, for what ? To separate the columns and keep the borders from touching. There may be a better way but no one jumped in to help so I gave it a shot. Cheers.
http://jsfiddle.net/h4mjf/3/
bad HTML, and lot of repetition in CSS
@krysak4ever Improve it then. Thanks.
proposed solution
http://codepen.io/krsiakdaniel/pen/chaJD
view it in browser
http://codepen.io/krsiakdaniel/full/chaJD
1.] you do not need to declare class .table
2.] empty TD and class blank, for what ?
3.] CSS obvious first sight repetition
a] things that have common settings can be group (not declared 3 times the same)
b] then you write only stuff that differs
c] ussing classes on TD is good for IE 6,7,8 which ignores E:nth-child
result = less verbose code, which is shorter, easy to use and read
2.] empty TD and class blank, for what ?
To separate the columns and keep the borders from touching. There may be a better way but no one jumped in to help so I gave it a shot. Cheers.