60 likes | 156 Views
CSS background. Credit : http ://www.tizag.com / Fppt.com.
E N D
CSS background Credit: http://www.tizag.com/ Fppt.com
The background of your website is very important, so please spend some time with this tutorial. If you are aiming for a professional website, a good rule of thumb is to use a light background with dark text. However, if you're just making a website for pleasure, then any kind of color combination is acceptable. CSS background With CSS, you are able to set the background color or image of any CSS element. In addition, you have control over how the background image is displayed. You may choose to have it repeat horizontally, vertically, or in neither direction. You may also choose to have the background remain in a fixed position, or have it scroll as it does normally. The following examples will show you how to implement all of these options. css background color As you will see throughout this Tutorials, many different background colors are present. These varying backgrounds were obtained without using tables! Below are a couple examples of CSS backgrounds. Credit: http://www.tizag.com/ Fppt.com
CSS Code: Display: In the above example we used three different formats for defining a color: a color name, hexadecimal values, and RGB. Hexadecimal form is a pound sign (#) followed by, at most, 6 hex values (0-F). RGB defines the individual values for Red, Green, and Blue. Example form: rgb(Red, Green, Blue); with the range of 0-255 for each value. Credit: http://www.tizag.com/ Fppt.com
css background image • Need an image to repeat left-to-right, Or maybe you would like to have an image that remains fixed when the user scrolls down your page. This can be done quite easily with CSS and more, including: • choosing if a background will repeat and which directions to repeat in. • precision positioning • scrolling/static images • Let's begin with a default CSS background image. CSS Code: Display: Credit: http://www.tizag.com/ Fppt.com
background image repeat You can have a background image repeat vertically (y-axis), horizontally (x-axis), in both directions, or in neither direction. CSS Code: Display: Credit: http://www.tizag.com/ Fppt.com
Prepared by: Felix KwabenaAssah-Achina BYU-I CIT-230 2014 Credit: http://www.tizag.com/ Fppt.com