how to apply different css styles to different part of sentence?

J

Jeff

hi

asp.net 3.5

I'm wonerig how to apply css settings to a sentence, where individual words
must have different styling?

Lets say this sentence:
"Hey, I got much to learn about css!"

In the above sentence the word Hey, should have font-weight:bolder;
font-size:12px;
"much to learn" font-size:10
"css" should be in red color font-size:14px;

any ideas?
 
J

Jonathan Wood

Put the text within a <span></span> tag. Span can be assigned a CSS style
and keeps the text inline with the surrounding text.
 
J

JM

I'm wonerig how to apply css settings to a sentence, where individual
words must have different styling?

Lets say this sentence:
"Hey, I got much to learn about css!"

In the above sentence the word Hey, should have font-weight:bolder;
font-size:12px;
"much to learn" font-size:10
"css" should be in red color font-size:14px;

any ideas?

<span style="font-size: 12px; font-weight: bold">Hey</span>
<span style="font-size: 10px">, I got much to learn about</span>
<span style="color: red; font-size: 14px"> CSS!</span>

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top