HTML help |
HTML help |
gibkev |
Apr 26 2021, 07:36 AM
Post
#1
|
Group: Members Posts: 4 Joined: 26-April 21 Member No.: 27,912 |
Hi
I need help with the below website I need to add text and change the background colour but dont know how. I have tried and tried but no luck. Please help. Thanks Kevin <!doctype html> <html> <head> <title>GEDS</title> </head> <style> body {margin:0;} ul { list-style-type: none; margin: 0; padding: 0; overflow: hidden; background-color: #333; position: fixed; top: 0; width: 100%; } li { float: left; } li a { display: block; color: white; text-align: center; padding: 14px 16px; text-decoration: none;a } li a:hover:not(.active) { background-color: #111; } .active { background-color: #4CAF50; } </style> <ul> <li><a href="home2.php">Home</a></li> <li><a href="contacts2.php">Contacts</a></li> <li><a href="doc.php">Docs</a></li> <li><a class="active" href="#beneficiaries2.php">Beneficiaries</a></li> <li><a href="faqs2.php">FAQs</a></li> <li><a href="media2.php">Media</a></li> <li><a href="social.php">Social Media</a></li> </ul> I want to change the text here and background colours </html> |
Christian J |
Apr 26 2021, 08:04 AM
Post
#2
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
First, the STYLE element must be inside HEAD, while the visible content of the web page goes into BODY. Then you can style the BODY element in different ways:
CODE <!doctype html> <html> <head> <title>Title text</title> <style> body {color: #f00; background: #0f0;} </style> </head> <body> <ul> <li><a href="home2.php">Home</a></li> <li><a href="contacts2.php">Contacts</a></li> <li><a href="doc.php">Docs</a></li> <li><a class="active" href="#beneficiaries2.php">Beneficiaries</a></li> <li><a href="faqs2.php">FAQs</a></li> <li><a href="media2.php">Media</a></li> <li><a href="social.php">Social Media</a></li> </ul> I want to change the text here and background colours </body> </html> (I formatted the code to make it more readable, but this is not technically necessary). Note that since the menu is positioned fixed at the top (in your CSS example), it will cover the first lines of text on the page. To prevent that, you might give the BODY element a top padding that's big enough to push the text down. |
pandy |
Apr 26 2021, 08:08 AM
Post
#3
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Just type the text there, put in appropriate elements. Like...
CODE <p> Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text</p> <p> Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text</p> As for the backgrounds, find the occurrences of background-color in the style sheet and change their values to you liking. |
gibkev |
Apr 27 2021, 02:38 AM
Post
#4
|
Group: Members Posts: 4 Joined: 26-April 21 Member No.: 27,912 |
Thanks.
But it didnt work I lost the menu at the top... I have added some pics for your perusal. Thank you again and hope you can help me with this issue. Kevin First, the STYLE element must be inside HEAD, while the visible content of the web page goes into BODY. Then you can style the BODY element in different ways: CODE <!doctype html> <html> <head> <title>Title text</title> <style> body {color: #f00; background: #0f0;} </style> </head> <body> <ul> <li><a href="home2.php">Home</a></li> <li><a href="contacts2.php">Contacts</a></li> <li><a href="doc.php">Docs</a></li> <li><a class="active" href="#beneficiaries2.php">Beneficiaries</a></li> <li><a href="faqs2.php">FAQs</a></li> <li><a href="media2.php">Media</a></li> <li><a href="social.php">Social Media</a></li> </ul> I want to change the text here and background colours </body> </html> (I formatted the code to make it more readable, but this is not technically necessary). Note that since the menu is positioned fixed at the top (in your CSS example), it will cover the first lines of text on the page. To prevent that, you might give the BODY element a top padding that's big enough to push the text down. This post has been edited by gibkev: Apr 27 2021, 02:43 AM |
gibkev |
Apr 27 2021, 02:54 AM
Post
#5
|
Group: Members Posts: 4 Joined: 26-April 21 Member No.: 27,912 |
Thanks lets see what happens
Just type the text there, put in appropriate elements. Like... CODE <p> Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text</p> <p> Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text</p> As for the backgrounds, find the occurrences of background-color in the style sheet and change their values to you liking. |
Christian J |
Apr 27 2021, 06:48 AM
Post
#6
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
|
gibkev |
Apr 28 2021, 02:28 AM
Post
#7
|
Group: Members Posts: 4 Joined: 26-April 21 Member No.: 27,912 |
|
Lo-Fi Version | Time is now: 26th April 2024 - 05:10 AM |