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

PHP forms
HTML Tutorial

CSS Tutorial

CSS div class background color


CSS Tutorial » CSS div class background color


CSS div class background-color property specifies the background color of a class.


Syntax:

Syntax: class background-color property CSS.
.class_name { background-color: value; }

Note: use external CSS instead.

With CSS, a background-color property is most often specified by:
- color name - like "red"
- HEX value - like "#ff0000"
- RGB value - like "rgb(255,0,0)"

How to create CSS div class background color - examples


You can try to execute the following code to change background-color property of a div on this page.

Example:
Example 1, How to create CSS div class background color - examples:

  <!DOCTYPE html>
<html>
<head>
<title>How to create CSS div class background color - examples - example</title>
<style>
#first_box {
width: 380px;
border: 2px solid #00FF00;
background-color: #FFFF99;
}
.second_box { width: 276px;
border: 2px solid #0000FF;
margin-top: 18px;
background-color: #FFCC99; }
</style>
</head>
<body>
<div id="first_box"> <h1>How to create CSS div class background-color property</h1> Create CSS div class background-color property
<div class="second_box">How to create div CSS id and class property - examples - example.</div> </div>
<div class="second_box">Add your text here
This it is some text</div>
</body>
</html>
Note: Use external CSS instead.

css div style background color, how to put a background color in css CSS div class background color - css tutorial

3012. CSS Text Style Bold - Text Decoration - Text Shadow, css tutorial
CSS Text Style Bold - Text Decoration - Text Shadow css tutorial
http://www.agernic.com/css-tutorial/css-text-style-bold-text-decoration--text-shadow.html

3010. CSS Margin, top, bottom, left, righ, auto, css tutorial
CSS Margin, top, bottom, left, righ, auto css tutorial
http://www.agernic.com/css-tutorial/css-margin-top-bottom-left-righ-auto.html

809. CSS background properties - CSS tutorials - w3resource

https://www.w3resource.com/css/background/CSS-background.php

2704. CSS Layers - CSS tutorial
EchoEcho.Com : The complete CSS tutorial
http://www.echoecho.com/csslayers.htm

2232. CSS Tutorial - Font and font families
There are mainly two types of fonts which are: serif and sans serif. There isn
https://tutorialehtml.com/en/css-tutorial-font-and-font-families/

3014. CSS width and height - CSS Properties - Dimensions units, css tutorial
CSS width and height - CSS Properties - Dimensions units css tutorial
http://www.agernic.com/css-tutorial/css-width-and-height-properties-dimensions-units.html

Your add here
PHP strrchr() Function

PHP isset() Function

PHP count() Function

PHP md5() function

PHP define() function

PHP ucfirst() function

PHP htmlentities() function

PHP ucwords() function

PHP explode() function

PHP trim() function

PHP str_repeat() function

PHP strlen() function

PHP empty() Function

PHP htmlspecialchars() function

PHP strstr() function

PHP strcmp() function

HTML colors, background, text and border color
PHP Install
HTML button onclick - How to create a HTML button style onclick
CSS Button Style
Insert into SQL - Insert into table SQL - Insert data in sql
HTML List Style Type