Jump to content

How to change the background color of a specific area in the webpage??

mrchow19910319
Go to solution Solved by 79wjd,

Create a div/section for the area you want to be a certain color. Then set the background to a color with css. "background-color: black;"

I want my website have this kind of visual styling.... The background color differs from each other when the section changes. 

Is there any specific method when it comes to this????

How do I achieve that??? 

PS, here is my actual code. 

Screen Shot 2017-01-04 at 6.10.45 AM.png

 

 

 

 

If it is not broken, let's fix till it is. 

Link to comment
Share on other sites

Link to post
Share on other sites

Create a div/section for the area you want to be a certain color. Then set the background to a color with css. "background-color: black;"

PSU Tier List | CoC

Gaming Build | FreeNAS Server

Spoiler

i5-4690k || Seidon 240m || GTX780 ACX || MSI Z97s SLI Plus || 8GB 2400mhz || 250GB 840 Evo || 1TB WD Blue || H440 (Black/Blue) || Windows 10 Pro || Dell P2414H & BenQ XL2411Z || Ducky Shine Mini || Logitech G502 Proteus Core

Spoiler

FreeNAS 9.3 - Stable || Xeon E3 1230v2 || Supermicro X9SCM-F || 32GB Crucial ECC DDR3 || 3x4TB WD Red (JBOD) || SYBA SI-PEX40064 sata controller || Corsair CX500m || NZXT Source 210.

Link to comment
Share on other sites

Link to post
Share on other sites

You use a:hover in CSS.

Just make a code block in CSS on that specifically focuses on a:hover (optionally only in a specific div) and format the styling for hovering over something there.

 

There is also visited and clicked, which can be interesting to use too.

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
Share on other sites

Link to post
Share on other sites

10 minutes ago, djdwosk97 said:

Create a div/section for the area you want to be a certain color. Then set the background to a color with css. "background-color: black;"

Okok.... I did it... Did not think it was that simple... 

If it is not broken, let's fix till it is. 

Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, Minibois said:

You use a:hover in CSS.

Just make a code block in CSS on that specifically focuses on a:hover (optionally only in a specific div) and format the styling for hovering over something there.

 

There is also visited and clicked, which can be interesting to use too.

Thanks I used his method.. A lot easier. 

If it is not broken, let's fix till it is. 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×