Azu Posted June 5, 2007 Share Posted June 5, 2007 Hi, I've noticed in some websites, that certain words are made to show up differently, and they don't even have anything around them in HTML. Can somebody please tell me how to do this? E.G. make all instances of "BLAH" be underlined or something? I'm totally stumped on this.. ??? Quote Link to comment https://forums.phpfreaks.com/topic/54256-making-certain-word-look-differant/ Share on other sites More sharing options...
micah1701 Posted June 5, 2007 Share Posted June 5, 2007 'um not sure you can mark up text w/o using a mark-up language. can you site some more specific examples? maybe a link would be nice? Quote Link to comment https://forums.phpfreaks.com/topic/54256-making-certain-word-look-differant/#findComment-268615 Share on other sites More sharing options...
Azu Posted June 5, 2007 Author Share Posted June 5, 2007 Hi, I would like to use CSS as my mark-up language for this please. And I don't remember the URL, it was one of the sites I was looking up CSS stuff on, and certain words had special effects on them but it wasn't in the html. I am just wandering how I can do this to. With the CSS? I have tried "Blah":before{content:"<u>"}"Blah":after{content:"</u>"} but it didn't work? Please tell me how.. :s Quote Link to comment https://forums.phpfreaks.com/topic/54256-making-certain-word-look-differant/#findComment-268763 Share on other sites More sharing options...
ToonMariner Posted June 6, 2007 Share Posted June 6, 2007 css needs some kind of element to make the selector or class/id inorder to act on anything. If you are absolutley positive there is nothing like a span around the word then it is javascript doing the job. to check switch js or css off and see what happens. Quote Link to comment https://forums.phpfreaks.com/topic/54256-making-certain-word-look-differant/#findComment-268886 Share on other sites More sharing options...
Azu Posted June 7, 2007 Author Share Posted June 7, 2007 Well I know how to do it with links or pretty much any tag E.G. <b> so I'm pretty sure it can be done with words to I just don't know how.. so any help would be appreciated, please? E.G. here is how to do it to links a[href]:before{content:"lolerskates[div]"} a[href]:after{content:"[div]rofelcopters"} Please tell me how to do it to a certain word I would really really appreciate it.. in CSS not JS please.. Quote Link to comment https://forums.phpfreaks.com/topic/54256-making-certain-word-look-differant/#findComment-269995 Share on other sites More sharing options...
BrightHearted Posted June 7, 2007 Share Posted June 7, 2007 It cannot be done without JS/DOM Scripting. CSS alone can't get that job done. I wish it could . Quote Link to comment https://forums.phpfreaks.com/topic/54256-making-certain-word-look-differant/#findComment-270165 Share on other sites More sharing options...
ToonMariner Posted June 7, 2007 Share Posted June 7, 2007 Sorry Azu but everyone on this thread agrees - you cannot do it on a single word that is in the same tage as other words without either JS doing a regular expresion replacement. If you want css to do it then you MUST place something like <span> around the word and uss css to style that element.. Quote Link to comment https://forums.phpfreaks.com/topic/54256-making-certain-word-look-differant/#findComment-270215 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.