|
How can I color a div and place text on top
|
Digmen1
#:3615055
| 4:43 am on Mar. 31, 2008 (utc 0) |
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
#:3615083
| 5:52 am on Mar. 31, 2008 (utc 0) |
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
#:3615122
| 7:45 am on Mar. 31, 2008 (utc 0) |
Thanks ! Worked a treat ! Regards Digby
|