SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Addict
    Join Date
    Mar 2004
    Location
    Europe
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    'content' working in ANY browser?

    Has anyone got the 'content' pseudo element to display in any browser?

    I'm trying to use css to generate site wide content.

  2. #2
    SitePoint Guru
    Join Date
    Feb 2004
    Location
    Oregon
    Posts
    686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how are you using it.

    and my guess is that since it is css2 that IE will not do it.
    success is not by chance, it is by choice.

  3. #3
    SitePoint Addict
    Join Date
    Mar 2004
    Location
    Europe
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm doing the way the W3C say, using thier code! I've tested it in IE4,5,6, Opera 7 and Firefox. Nothing.

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,367
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    This works in firebird and Mozilla.
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <style type="text/css">
    a[target|="_blank"]:link:after {content:"(This is an external link)";background:#FFFFCC;}
    </style>
    </head>
    <body>
    <p><a href="#">hello </a></p>
    <p><a href="#" target="_blank">hello </a></p>
    <p><a href="#">hello </a></p>
    </body>
    </html>
    Paul

  5. #5
    SitePoint Guru
    Join Date
    Feb 2004
    Location
    Oregon
    Posts
    686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    does not work in IE6.0.2800 sp1 on w2k. but I didn't expect it too.
    success is not by chance, it is by choice.

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,367
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    No it doesn't work in ie at all as I stated above it works in mozilla and firebird.

    I thought you just wanted to see it working in a browser

    Paul

  7. #7
    SitePoint Wizard megamanXplosion's Avatar
    Join Date
    Jan 2004
    Location
    Kentucky, USA
    Posts
    1,099
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mozilla, Firebird, and Opera all support the content rule. Internet Explorer just sits there saying "duhhhh what do I do george? What do I do?"

  8. #8
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Subjective Effec
    Has anyone got the 'content' pseudo element to display in any browser?

    I'm trying to use css to generate site wide content.
    a word of caution, however: "true" content should always reside in your xhtml, not the css. you can use the css content rule to do funky stuff with already existing content (e.g. writing out an image's alt or title as a visible caption underneath it) or for whimsical visual stylings (e.g. adding typographical symbols or some such stuff which is not "true" content)...but never to actually generate important content (as it's not supported in IE, AND in terms of accessibility that would be really bad, since screenreaders and such wouldn't recognise it).
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  9. #9
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,367
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by redux
    "true" content should always reside in your xhtml
    Good Point

  10. #10
    SitePoint Addict
    Join Date
    Mar 2004
    Location
    Europe
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is for some small bits of info that will be replaced on all the pages regularly and for the links. Large content of importance will be in html.

  11. #11
    SitePoint Addict
    Join Date
    Sep 2003
    Location
    Europe
    Posts
    222
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, it won't work in IE (maybe in version 7), so it's no use. Look to SSI or PHP includes instead.

  12. #12
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by yngwin
    Look to SSI or PHP includes instead.
    i second that wholeheartedly. otherwise, you may as well use an imported javascript or something...it will yield the same problems (a percentage of your users not seeing the end result, and it not being accessible)
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •