Sunday, August 19, 2018

How can I target the tbody of a specific Div?

I have a table that I'd like to target with CSS. The table is inside a div called inner1b

inner1b.tbody{
display:block;
height:800px;
overflow:auto;
}

doesn't seem to be working

Solved

inner1b does not have a . or a #, so your rule is looking for , which isn't a valid HTML tag. You need to do

.inner1b table tbody {
...
}

.inner1b tbody { ... }

Your mistake was connecting the two selectors, which implies a single element. The dot was also out of place.




No comments:

Post a Comment