Tuesday, September 13, 2011

How do you change just one word in css?

Hi!



I want to change just one word with css. Change font, color, size and place on the page.How do you change just one word in css?
Use the span tag to surround the one word and put a style or class on it.



%26lt;span style=';color:red;font-size:12pt;font-fam?New Roman'';%26gt;MyWordToChange%26lt;/span%26gt;How do you change just one word in css?
Examples...



%26lt;p style=';width: 420px; border-bottom: 2px solid #f00;';%26gt;%26lt;span style=';line-height: 4em;';%26gt;All these words will have a red underline 4em below text.%26lt;/span%26gt;%26lt;/p%26gt;



%26lt;p%26gt;%26lt;span style=';background: #000; color: #fff; line-height: 2em; padding: 0 10px;';%26gt;These words will have a background color 2em high and white text.%26lt;/span%26gt; These will not.%26lt;/p%26gt;



%26lt;p%26gt;%26lt;span style=';word-spacing: 1.25em; color: #fff; font-size: 2em; font-weight: 900;';%26gt;These words will be in white, size 2em and bold.%26lt;/span%26gt; These will not.%26lt;/p%26gt;



%26lt;p%26gt;%26lt;span style=';background: #000; color: #f00; line-height: 2em; font-weight: bold; padding: 0 10px;';%26gt;These words will have a background color 2em high and in red text.%26lt;/span%26gt; These will not.%26lt;/p%26gt;



Ron

No comments:

Post a Comment