kiran22smiles Posted August 20, 2009 Report Share Posted August 20, 2009 hi all i have one probelm with css classes, i want a seperate css style for a word in a paragrapah without mentioning any attributes. Example : dfgfdgdfgsdgdfgdfggsgdggsd 'class' sdgfsdfsfsdfsdfsdf in above paragraph i want a styel for word 'class' is there any possibility. plz help me. thanks in advance:( Quote Link to comment Share on other sites More sharing options...
Andrea Posted August 20, 2009 Report Share Posted August 20, 2009 If you only want to style that one occurance in the whole site, just use inline styling: dfgfdgdfgsdgdfgdfggsgdggsd 'class' sdgfsdfsfsdfsdfsdf If the word 'class' occurs more often on your site, then put the CSS into your external stylesheet: dfgfdgdfgsdgdfgdfggsgdggsd 'class' sdgfsdfsfsdfsdfsdf and your CSS .different {font-color: #123456;} There's no way to avoid attributes - unless you are using an existing selector like: dfgfdgdfgsdgdfgdfggsgdggsd 'class' sdgfsdfsfsdfsdfsdf and CSS: em {font-color: #123456;} Quote Link to comment Share on other sites More sharing options...
kiran22smiles Posted August 20, 2009 Author Report Share Posted August 20, 2009 (edited) thanks for your reply. but i dont want any tags around it (like span, p, etc...). that is the prob. i know iam asking a stupid question, but i want to know the possibility thanks Edited August 20, 2009 by kiran22smiles Quote Link to comment Share on other sites More sharing options...
Andrea Posted August 20, 2009 Report Share Posted August 20, 2009 You cannot style without tags. What's the problem with tags? It's not that they'll show on your page - and tags is how it works. Quote Link to comment Share on other sites More sharing options...
lm Posted August 20, 2009 Report Share Posted August 20, 2009 there certain rules for web typography so you can either google it to learn or use this source for example. Quote Link to comment 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.
Note: Your post will require moderator approval before it will be visible.