Help - Search - Members - Calendar
Full Version: Basic Color change of text
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
peakyblinder
Hi, apologies that this is such an easy one, but I am relatively inexperienced in html. I have added a scroll box to my site but want to change the colour of the text to white, but can not work out how to do this. Could anyone assist?

Thanks

CODE

<div style="height:529px;width:1000px; Garamond, Serif;overflow:auto;">
<p style ="color:#ffffff;">
<p><strong>ALL TECHNIQUES MUST BE CONTROLLED K.O IS NOT ALLOWED</strong></p>

<p><strong>A. OFFICIALS</strong></p>

</p>
</div>

Christian J
This part seems correct:

CODE
<p style ="color:#ffffff;">

but you can't nest P elements, so when the next one appears:

CODE
<p><strong>ALL TECHNIQUES ...

it automatically ends the first one. And since the first one lacks content, there is no text to make white inside it.

If you want both lines of text to be white, it might be better to add the CSS to the parent DIV element instead (or you could add the CSS to each separate P that contains text). It's also good practice to specify color and background at the same time, so you won't end up with invisible white text on a white background.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2019 Invision Power Services, Inc.