The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Basic Color change of text
peakyblinder
post 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>

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Nov 19 2018, 12:45 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,630
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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 07:58 AM