user663724
user663724

Reputation:

Inine CSS for Text inside DIV

Inside the DIV Tag

<div name="layer1" style="background-color:lightblue;">
<hr>Site:Downtown DataCenter Device: 2KBS</hr>
</div>

Hi ,

I am using Inline CSS Styling . Inside the hr tag of my Div tag i want to have the text "site" and "Device" as bold and with big font ?

How can i have it

Please advice .

Upvotes: 0

Views: 172

Answers (2)

Marty
Marty

Reputation: 39456

Firstly, <hr> is not intended to contain anything, much like <img> or <br />.

Try this:

<div class="layer1">
    <strong>Site:</strong> Downtown DataCenter <strong>Device:</strong> 2KBS
</div>
<hr></hr>

The CSS might look like this:

.layer1
{
    background-color: lightblue;
}

.layer1 strong
{
    font-size: larger;
}

Upvotes: -1

detaylor
detaylor

Reputation: 7280

Try putting your content in a p. hr is a horizontal rule which is an empty element w3c specifcation. Put the text that you want into span elements and then apply styling font-weight:bold;font-size:20px or whatever size you want.

Upvotes: 3

Related Questions