Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Classes to Style in CSS

I've got a table, and inside of the table are elements. I would like to give the table one class "chart" and then style all of the elements that are inside of that table by giving them padding.

Is this possible?

I was thinking something like...

info.table.td{
    padding:2px;
}

Would be possible, but it does not work :V I know that . is sort of the class operator, but I thought it would make sense on a tag type as well.

like image 946
Jazzepi Avatar asked May 08 '26 08:05

Jazzepi


1 Answers

info.table.td means an <info> element with the classes table and td (which is nonsense).

You probably mean table.info td, which means any td that is a child of a table with the class info.

like image 136
deceze Avatar answered May 10 '26 22:05

deceze



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!