Welcome to WebmasterWorld Guest from 54.160.244.240

Forum Moderators: not2easy

Message Too Old, No Replies

Control on specific content

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

New User

10+ Year Member

joined:Apr 7, 2006
posts:4
votes: 0


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!

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

New User

10+ Year Member

joined:Apr 7, 2006
posts:4
votes: 0


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!

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

Preferred Member

10+ Year Member

joined:Feb 28, 2005
posts:646
votes: 0


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

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

New User

5+ Year Member

joined:May 17, 2006
posts:32
votes: 0


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

what does this mean?

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

Preferred Member

10+ Year Member

joined:Feb 28, 2005
posts:646
votes: 0


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 :)

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

New User

10+ Year Member

joined:Apr 7, 2006
posts:4
votes: 0


there is a way to make IE6 to support selector[att=val]: [dean.edwards.name...]
9:20 am on June 15, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Feb 28, 2005
posts:646
votes: 0


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.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members