0

How can a change a particular section's background color on a Web page

How do I format my Web page to make different sections have different colours or different background pictures?

23rd Dec 2016, 3:47 AM
valentine
valentine - avatar
3 Respostas
+ 4
For more accuracy: - background-image:url('path_to/image_file'); --> picture - background-color:#xxxxxx; --> color ( could be hexa, rgb, rgba or name format ) - background: --> all attributes ( among which color and picture ) And you can use them, as all css, in several ways: - inline, with the style attribute of the wanted tag to decorate --> <div style="background:yellow;"> ( but it's ugly, don't except in work on progress ) - by targeting the element with a definition inside a <style> tag, or via a linked external css ( <link rel="" href="file.css"> in the <head> ) With the second solution, you can target your particular element using css selectors and associated rules selector: if you don't see what I'm talking about, you'll be advise to go towards the CSS SoloLearn curse :P ( or use the first solution, or go elsewhere learn css ;) )
23rd Dec 2016, 5:50 AM
visph
visph - avatar
+ 3
just use the background-image atribute, on the section you want , and in the src you asign the one you want.
23rd Dec 2016, 4:40 AM
Nahuel
Nahuel - avatar
0
Thanks guys
23rd Dec 2016, 9:29 AM
valentine
valentine - avatar