Basic Color change of text |
Basic Color change of text |
peakyblinder |
Nov 19 2018, 12:05 PM
Post
#1
|
Group: Members Posts: 1 Joined: 19-November 18 Member No.: 26,757 |
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 |
Nov 19 2018, 12:45 PM
Post
#2
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
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. |
Lo-Fi Version | Time is now: 25th April 2024 - 12:36 PM |