homepage Welcome to WebmasterWorld Guest from 54.196.162.238
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
Control on specific content
illuvatar




msg:1185518
 1:26 am on Jun 15, 2006 (gmt 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!

 

illuvatar




msg:1185519
 1:53 am on Jun 15, 2006 (gmt 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!

Setek




msg:1185520
 2:01 am on Jun 15, 2006 (gmt 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...

gldnratio




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

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

what does this mean?

Setek




msg:1185522
 3:50 am on Jun 15, 2006 (gmt 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 :)

illuvatar




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

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

Setek




msg:1185524
 9:20 am on Jun 15, 2006 (gmt 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved