Welcome to WebmasterWorld Guest from 107.21.175.43

Forum Moderators: not2easy

Message Too Old, No Replies

Control on specific content

     

illuvatar

1:26 am on Jun 15, 2006 (gmt 0)

5+ Year Member



hey,

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!

illuvatar

1:53 am on Jun 15, 2006 (gmt 0)

5+ Year Member



after doing some research, i have come into this:
[w3.org...]

that is the exact thing i need, but i could not make it work. any ideeas?

thanks!

Setek

2:01 am on Jun 15, 2006 (gmt 0)

10+ Year Member



AFAIK, no.

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...

gldnratio

3:28 am on Jun 15, 2006 (gmt 0)

5+ Year Member



P.S.: In reply to your second response :) - CSS3 has limited if no support, most of all from IE...

what does this mean?

Setek

3:50 am on Jun 15, 2006 (gmt 0)

10+ Year Member



Well, IE doesn't support
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 :)

illuvatar

8:29 am on Jun 15, 2006 (gmt 0)

5+ Year Member



there is a way to make IE6 to support selector[att=val]: [dean.edwards.name...]

Setek

9:20 am on Jun 15, 2006 (gmt 0)

10+ Year Member



IE7 is a JavaScript library to make IE behave like a standards-compliant browser.

Possible, with javascript. That doesn't mean it supports

selector[att=val]
, just that there's a hack to make IE comply.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month