css3 - How to select a text (without tag) in a div using CSS selector? -
i have :
<div class="foo"> <h3>title</h3> text want select using css selector. <div class="subfoo">some other text</div> </div>
is possible select "some text want retrieve using css selector" using single expression of css selectors ?
it's not possible in clean manner pure css.
as vangel suggested recommend setting styling in .foo
selector apply overrides other elements:
.foo{ //some text styles } .foo *{ //overriding styles }
however best option make changes html place text in own element can styled in isolation:
<div class="foo"> <h3>title</h3> <span>some text</span> <div class="subfoo">some other text</div> </div> .foo span { //some text styling }
Comments
Post a Comment