Forum Moderators: not2easy

Message Too Old, No Replies

How can I color a div and place text on top

         

Digmen1

4:43 am on Mar 31, 2008 (gmt 0)

10+ Year Member Top Contributors Of The Month



Hi Guys

I have set up a div that I am placing in a column.

I want to color the div and add text of a different color to it.

What code should I add to my style sheet to do this please ?

Kind Regards

Digby

Setek

5:52 am on Mar 31, 2008 (gmt 0)

10+ Year Member



If it's a specific situation, you'd do best to add a class or an ID on the
div
.

So, in the HTML it would say:

<div class="special"> ... </div>

And in the CSS:

div.special { background-color: #f0f; /* This property is for the background colour */
color: #0ff; /* This property is for the text colour */ }

That's it!

Digmen1

7:45 am on Mar 31, 2008 (gmt 0)

10+ Year Member Top Contributors Of The Month



Thanks !

Worked a treat !

Regards

Digby