AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL

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

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


CSS Scrollbar Horizontal
CSS Scrollbar in Div
CSS Scrollbar Firefox
CSS Style Scrollbar
CSS Style Text
CSS background color
CSS Div Id Class
CSS Text Wrap
CSS text-align
CSS Text Decoration
CSS Text Shadow
CSS Text Color
CSS Text Bold
CSS Text Size
CSS background image full
CSS background opacity
CSS border radius
CSS rounded corners
CSS font color
CSS Class & ID
CSS align image center
CSS align content
CSS link color
CSS Text Style
CSS Text Font Size
CSS max width &height
CSS width and height
CSS Margin
CSS Padding
CSS Border Style
CSS background
CSS in HTML
Basic Syntax of CSS
CSS Introduction
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


Upload Image, display, edit and delete i...
Login Form with Image background...
How to Create an Image with Transparent ...
Portfolio Gallery Website with filtering...
Simple pagination script PHP MySQLi...
Center Image in div...
Image Hover Overlay Fade...
Sticky image / element / div on scroll...
Responsive images...
Create rounded image in HTML CSS...
Add border around image...
Position Text Over an Image HTML CSS res...
Create a Slideshow Images Gallery...
Create a Sticky Sidebar...
Search bar using CSS HTML...
Shrink Navigation Menu on Scroll...
How to Create Accordion HTML Templates...
Dropdown menu in the navigation bar...
Responsive Top Navigation Bar with mobil...
Split horizontal navigation bar...