Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Div bold and regular

Tags:

css

I am not a css expert but still trying to learn the best way...

I have a div and in that div I am showing a message and the first half message is bold and the second half the message is regular. Like this below

It’s a bit complicated to get JSONP working with a simple WCF service.

Luckily, there’s some sample code on MSDN to do it for you; it’s just not obvious how to take advantage of it. Here it is in 3 “easy” steps!

My css is like this:

#formmsg.text-success
{
    color:black;
    font-weight:bold;
    margin:0px 0px 10px;
}

My question is, how can I use style for bold/regular or do I need to create another style for that?

like image 482
Nick Kahn Avatar asked Dec 28 '22 23:12

Nick Kahn


2 Answers

You could do this...

HTML

<p>It’s a bit complicated to get JSONP working with a simple WCF service.</p>

<p>Luckily, there’s some sample code on MSDN to do it for you; it’s just not obvious how to take advantage of it.</p>

CSS

p:first-child {
   font-weight: bold;
}

Note this won't work in IE6. You will also no doubt have many more p elements on your page, so provide a parent element in the selector.

like image 109
alex Avatar answered Jan 25 '23 06:01

alex


<p><b>It’s a bit complicated to get JSONP working with a simple WCF service.</b></p>

<p>Luckily, there’s some sample code on MSDN to do it for you; it’s just not obvious how to take advantage of it. Here it is in 3 “easy” steps!</p>

OR

<p class="bold">It’s a bit complicated to get JSONP working with a simple WCF service.</p>

<p>Luckily, there’s some sample code on MSDN to do it for you; it’s just not obvious how to take advantage of it. Here it is in 3 “easy” steps!</p>

with css

.bold{
font-weight:bold;}
like image 20
callum.bennett Avatar answered Jan 25 '23 06:01

callum.bennett