How to Position HTML DIV tag at the Center?

Following StyleSheet class will position the DIV tag at the center of the screen. This is often required when showing the “Please Wait…” or “Processing…” message while processing Ajax request.


DIV.centered
{
border: 0;
background-color: #6095b3;
height: 10%;
width: 20%;
position: fixed;
_position: absolute;
left: 40%;
top: 40%;
color: black;
z-index: 100;
}

Your comments are always welcome !

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: