Monday, February 28, 2011

Min-height issue in ie

Some how a normal problem to deal with ie issue is min-height.usually we put
min-height:100px;
height:auto;
But ie doesn't show the property.Now it can be possible,there is a simple code for all the browsers including ie.

#Mydiv
{
min-height:70px;
height:auto !important;
position:relative;
height:70px;
}

This will work with ie as well as firefox and crome.

Enjoy!! :)

Monday, February 14, 2011

Centralize DIV

div at center position:








To centralize the div you can simply add style with two property
text-align:center; and margin:0 auto;
for example,create an ID or class


my new id

Now you can see that your wrapper call will exactly display on the center of the body.

display bottom-right

Display Bottom-right:

How can you display your text or image in a fixed position.This can be done through padding and margin.But in case your div will expand, the text will move from their position.

You can handle your div with the following property:

.Mydiv
{
padding: 0px;
margin: 0px;
position: absolute;
bottom:10px;
right: 7px;
}

There is no need of set the padding or margin.

Display top-left:








.Mydiv
{
padding: 0px;
margin: 0px;
position: absolute;
bottom:10px;
right: 7px;
}