chang text inline using CSS (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets and Accessibility



Message


milo3169 -> chang text inline using CSS (9/14/2005 17:02:02)

Does anybody know if I can change the style of text on the same line? I'm using a Class for the paragraph but in between the paragraph I would like to change the size and style of the font with out the line breaking. Can anyone show me how to do this?




Tailslide -> RE: chang text inline using CSS (9/14/2005 17:10:29)

Easiest way would be to stick the particular bit of text you want to change into a <span> like this:

HTML:
<p class="whatever">To be or not to be <span class="newstyle">that is the question.</span></p>

CSS:
p.whatever {font-size:100%; font-weight:normal;}
.newstyle {font-size: 110%; font-weight:bold;}



Will give you:

To be or not to be that is the question.




milo3169 -> RE: chang text inline using CSS (9/14/2005 17:22:56)

Thank again Tailslide. That was it.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875