In this article i will show how you can display a div inside the center of a div using simple css style sheet.Here is the code
#divouter
{
width: 50%;
background-color: Yellow;
text-align: center;
}
#divinner
{
display: inline-block;
width: 20%;
background-color: Green;
color: White;
}
This is demo
In above code i have just used simple style sheet for displaying the div at the center of the another div
Now save it and open the file.
Tags: CSS/CSS3 , HTML
No comments:
Post a Comment