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

PHP forms
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

3301. CSS font color, css tutorial
CSS font color css tutorial
https://www.agernic.com/css-tutorial/css-font-color.html

2702. CSS Cursors - CSS tutorial
EchoEcho.Com : The complete CSS tutorial
http://www.echoecho.com/csscursors.htm

2591. CSS Introduction Tutorial, css tutorial
CSS Introduction Tutorial css tutorial
http://www.agernic.com/css-tutorial/css-introduction-tutorial.html

3180. CSS align image center - how to create, css tutorial
CSS align image center - how to create css tutorial
https://www.agernic.com/css-tutorial/css-align-image-center-how-to-create.html

819. CSS margin-top property - CSS tutorials - w3resource

https://www.w3resource.com/css/margin/CSS-margin-top-property.php

811. CSS border-top-style property - CSS tutorials - w3resource

https://www.w3resource.com/css/border/CSS-border-top-style-property.php

Your add here
PHP wordwrap() function

PHP htmlspecialchars() function

PHP empty() Function

PHP str_replace() function

PHP str_repeat() function

PHP similar_text() function

PHP define() function

PHP strtoupper() function

PHP isset() Function

PHP htmlspecialchars_decode() function

PHP implode() function

PHP print() function

PHP rtrim() function

PHP md5() function

PHP explode() function

PHP lcfirst() function

Display data from SQL database with MySQLi into php - html table
How to include, how to incorporate CSS in HTML
HTML button link - How to create a button style in HTML
How to get PHP errors to display?
HTML Table Color
SQL tutorial will teach you how to use SQL - Database