Online Training for Asp.net MVC Web Designing Development, MS SQL, Digital Marketing

Div CSS Style, CSS Tutorial


CSS style for DIV and Span is often useful; you can directly set standard style for DIV, Span, but that may not be good idea because div and span object are used multiple places with different style, so here we learn how to write class and apply on div and span .

Here are few div
My DIV 1
My DIV 2
My DIV 3
My DIV 4


Here is css class ".myDiv" for Div
.myDiv
{
border:solid 1px #0094ff;
padding:10px;
margin:5px;
font-size:15px;
font-family:Verdana;
text-align:center;
border-radius:10px;
}

.myDiv:hover
{
background-color:#808080;
color:#fff;
font-weight:bold;
}


You can also specify how any text with hyperlink will look like in your div
Here is the CSS code
.myDiv a
{
color:red;
text-decoration:none;
}

.myDiv a:hover
{
color:yellow;
text-decoration:none;
}

Comment
Name Email Website
Subscribe
 
Div CSS Style, CSS Tutorial

Group Training