Jump to content

Recommended Posts

Posted

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

Posted

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;}

Posted (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 by kiran22smiles
Posted

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.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...