Setting Backgrounds using CSS - Printable Version +- Forums.Likebd.Com (http://forums.likebd.com) +-- Forum: English Forums (http://forums.likebd.com/forumdisplay.php?fid=134) +--- Forum: Design and Development (http://forums.likebd.com/forumdisplay.php?fid=233) +---- Forum: CSS (http://forums.likebd.com/forumdisplay.php?fid=236) +---- Thread: Setting Backgrounds using CSS (/showthread.php?tid=3312) |
Setting Backgrounds using CSS - Hasan - 06-28-2018 This tutorial will teach you how to set backgrounds of various HTML elements. You can set following background properties of an element: The background-color property is used to set the background color of an element. The background-image property is used to set the background image of an element. The background-repeat property is used to control the repetition of an image in the background. The background-position property is used to control the position of an image in the background. The background-attachment property is used to control the scrolling of an image in the background. The background property is used as shorthand to specify a number of other background properties. RE: Setting Backgrounds using CSS - Hasan - 06-28-2018 Set the background color: Following is the example which demonstrates how to set the background color for an element. <p style="background-color:yellow;"> This text has a yellow background color. </p> |