Forum Moderators: not2easy
i know that i can control a tag that has an atribute, like for example a link with a specific title: a[title="Some title"]{CSS code here}.
is there any way to control an element that has no attributes, but to which i know the content?
for example: <p>SOME CONTENT</p>
can i do something to change the way the SOME CONTENT is displayed, WHITOUT adding ANY attribute to the <p></p> tag.
thanks!
that is the exact thing i need, but i could not make it work. any ideeas?
thanks!
CSS is about controlling -presentation- through -markup-, not through content. It's the markup that decides what -type- of content it is, be it a paragraph, a list, or a table of data.
Having said that, if it were possible, I'd assume a copy of the content would be in the CSS, determining how to style it because the content equates to such? Having the data in two spots is... redundant... and messy. One of CSS's strong points is the ability to change one file, one spot, and it fixes multiple files. Imagine maintenance updates?
:)
P.S.: In reply to your second response :) - CSS3 has limited if no support, most of all from IE...
selector[att=val] { }, or many other things in CSS2 and CSS3, :nth-child for instance. IE is a six-year-old-plus browser, without being updated, and doesn't conform to standard. With the release of CSS, they revised it and added functionality with CSS2, and have done the same with CSS3 - some browsers support some of these new additions, and some are yet to :)