+ 1

Can i style something else in same line?

IDK how to explain the title so dont mind it. to the question. html: <h1 class="homepage"> Project Number #1! </h1> css: h1.homepage { font-size: 20; font-variant: normal; text-decoration: underline; color: it doesnt really matter...; text-shadow: doest matter either; } so my question is can i make the underline/etc... ignore 1 text in the h1 like if its "Project Number #1!" can i ignore only the "Number" word or am i must copy all the code to another code like h1.homepage ignore {} or something like that? cause to make a whole new code for just1 word i think its stupid.

16th Aug 2016, 11:22 AM
TheAngel
TheAngel - avatar
3 Respuestas
+ 1
You can solve this by two ways, html or css: 1) HTML: first delete the "text-decoration: underline;" from the css. second, add the <u></u> tags between the words you want to underline, in your case: <h1 class="homepage"><u>Project</u> number #1</h1> 2)CSS: first delete the "text-decoration: underline;" from the css. second create another tag like <span class="underline"></span> and declare in the css a variable .underline{ text-decoration: underline;> } And then add the same tag between the words you want to underline e.g. <h1 class="homepage"><span class="underline">Project</span> Number <span class="underline">#1</span></h1> and then you can use the same function with any other text you want.
16th Aug 2016, 1:30 PM
Fabricio Bertani
Fabricio Bertani - avatar
0
hope you.understood what im trying.to ask XD
16th Aug 2016, 11:24 AM
TheAngel
TheAngel - avatar
0
@Fabricio Bertani thanks a lot it really helpped even tho it will fill all my file with this long way lol
16th Aug 2016, 7:32 PM
TheAngel
TheAngel - avatar