HOME | PHP Tutorial | CSS
facebook icon
AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP
HTML Tutorial

CSS Tutorial

CSS background, Color, Background Image

With Css we can add background colors and images to any element on the page. We can make a background image that does not completely cover the whole or the entire page repeat vertically, horizontally or in both directions.
Background styling is possible for each html tag (body, p, div, etc.).
To format the background of HTML elements using CSS, we use the following attributes:
background-color,
background image,
background-repeat,
background-attachment,
background-position,

Background Color aplay and change

The background-color property specifies the background color of an element. To change the background color of the whole page, we need to apply a style to the body tag. The background color of a page is set like this:
Example:
body {
background-color: red;
}
With CSS, a color can be often specified by:
a valid color name - like "red"
a HEX value - like "#ff0000"
an RGB value - like "rgb(255,0,0)"
In the example below we can use background colors to <h1>, <p>, and <div> elements.
Example:
h1 {
  background-color: #ff5070;
}

div {
  background-color: lightblue;
}

p {
  background-color: "rgb(255,0,0);
}

Adding a css background image

The background-image property specifies an image to use as the background of an element.
By default, the image is repeated so it covers the entire element.
Example:
body {
  background-image: url("picture_one.gif");
}
To repeat the image only vertically or only horizontally we will use the following CSS code:
Example:
body {
background-image:url("o_imagine.gif");
background-repeat:repeat-x;
}

Background Image - Set position and no-repeat

Showing the background image only once "no-repeat" is also specified by the background-repeat property:
Example:

body {
  background-image: url("imgage_one.png");
  background-repeat: no-repeat;
}

Background Image CSS - Fixed position

To specify that the background image CSS should be fixed, use the background-attachment property:
Example:
body {
  background-image: url("imgage_one.png");
  background-repeat: no-repeat;
  background-position: right top;
  background-attachment: fixed;
}


CSS background, background color, background Image CSS background, Color, Background Image - css tutorial

2804. CSS background, Color, Background Image, css tutorial
CSS background, Color, Background Image css tutorial
http://www.agernic.com/css-tutorial/css-background-color-image-css-tutorial.html

810. CSS syntax - CSS tutorials - w3resource

https://www.w3resource.com/css/basics/CSS-syntax.php

3300. CSS border radius, css tutorial
CSS border radius css tutorial
https://www.agernic.com/css-tutorial/css-border-radius.html

2697. EchoEcho.Com - Web Hosting - JavaScript Tutorial - HTML tutorial - CSS Tutorial - Flash Tutorial - Online for free!
Web hosting and tutorials for html javascript css flash. Online web master forum design articles, graphics, tools, tricks and much more
http://www.echoecho.com/

3191. How to include, how to incorporate CSS in HTML, css tutorial
How to include, how to incorporate CSS in HTML css tutorial
https://www.agernic.com/css-tutorial/how-to-include-how-to-incorporate-css-in-html.html

813. CSS box model - CSS tutorials - w3resource

https://www.w3resource.com/css/concepts/box-model.php

Your add here
How to get PHP errors to display?
How to prevent sql injection in php mysqli
How do I get PHP errors to display - PHP error_reporting()
mysql_query(): The mysql extension is deprecated and will be removed i
Function eregi_replace() is deprecated in php - How to fix
PHP delete an element from an array
Uncaught Error: Call to undefined function MYSQL_NUM_ROWS() in
Deprecated: mysql_connect() mysql extension is deprecated and will be
mysqli_fetch_array() expects parameter 1 to be mysqli_result boolean g
SQL IN Operator - example
SQL BETWEEN Operator
SQL like syntax and example
SQL WHERE AND & OR multiple conditions
SQL create table primary key autoincrement
PHP mysqli_connect () Function
SQL COUNT(), AVG() and SUM() Functions
Display data from SQL database with MySQLi into php - html table
SQL CREATE DATABASE - example
SQL mysql order by columns, by date, by asc, by desc, random with PHP
PHP mysqli_query() Function - mysqli query
SQL delete row - SQL delete table
SQL update - SQL update select
Insert into SQL - Insert into table SQL - Insert data in sql
Login in PHP - simple login script with PHP MYSQL