Absolute div in a floated div

While we use an absolute in a all floated structure it gives some issues like
His position changes accordingly screen resolution
To avoid such error
We can use position relative
Like this
Keep your wrapper always relative


#wrapper{
width:100%;
height:100%;
position:relative;
left:0px;
top:0px;
}

#yourDiv{
position:absolute;
left:20px;
top:15px;
width:200px;
height:200;
background:#ff0000;
}

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