/    Sign up×
Community /Pin to ProfileBookmark

Using Strong or … in CSS

Have done much research on this and still not having much luck!

Simply said…

I have in my style.css

P {
font-size: 12px;
color : #666666;
font-family : Verdana;
}

Now when creating my text if I happen to bold or strong something it DOES NOT take on these characteristics.

I have added to my style.css

strong {

font-weight: bold;

}

and have tried

p.strong {

font-weight: bold;

}

But neither works!

How do I get strong or bolded text to maintain what I have in the p tag as well as maintain the bold I put on the text?

Much thanks!

to post a comment
CSS

7 Comments(s)

Copy linkTweet thisAlerts:
@LiLcRaZyFuZzYOct 21.2005 — does this work for you?
<i>
</i>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;&lt;/title&gt;
&lt;style type="text/css"&gt;
&lt;!--
p.bold{
font-weight: bold;
}
--&gt;
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p class="bold"&gt;Bold&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
Copy linkTweet thisAlerts:
@ndorfnzauthorOct 21.2005 — Thanks, but no go!

Seems much to simple to not be able to do this! ?
Copy linkTweet thisAlerts:
@FangOct 21.2005 — This must work; it's the default weight for [I]strong[/I]
strong {
font-weight: bold;
}

Maybe you are confusing elements with class names.
Copy linkTweet thisAlerts:
@ndorfnzauthorOct 21.2005 — Maybe I can make it more clear... yes, the text DOES BOLD, however it does NOT take on the characteristics of the p that it sits within...

So my font is no longer font-family: Verdana

It appears to be arial or something, but I want Verdana. How do I establish text within a <p> tag that is bolded to remain Verdana via the linked styles.css that is defined in the p below

P {

font-size: 12px;

color : #666666;

font-family : Verdana;

}

Now when creating my text if I happen to bold or strong something it DOES NOT take on these characteristics ABOVE.

I have added to my style.css

strong {

font-weight: bold;

}
Copy linkTweet thisAlerts:
@LiLcRaZyFuZzYOct 21.2005 — and what if you set it to verdana in both elements?
Copy linkTweet thisAlerts:
@ndorfnzauthorOct 21.2005 — This is what I have... still doesn't work!

strong {

font-weight: bold;

font-size: 12px;

color : #666666;

font-family : Verdana;

}



P {

font-size: 12px;
color : #666666;
font-family : Verdana;

}
Copy linkTweet thisAlerts:
@LiLcRaZyFuZzYOct 21.2005 — does this work for you, it does for me
<i>
</i>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;&lt;/title&gt;
&lt;style type="text/css"&gt;
&lt;!--
p{
font-size: 12px;
color : #666666;
font-family : Verdana;
}
--&gt;
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;this is bold and &lt;strong&gt;strong&lt;/strong&gt;&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
×

Success!

Help @ndorfnz spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...