Please if find any one...
how image can be vertically centralized in browser in any resolution.
Collapse
X
-
Tags: None
-
I've static solution for this, means if you know the size of your image which you want to centralized. suppose your image size is 200px, you can use this css:
.abc{
position:absolu te;
float:left;
height:200px;
top:50%;
margin-top:-100px;
}
this will work for your problem if there is static images but if the images will come dynamically then you have to use this same css calculation using JS or any other development tool.
Regards,
Ashwani Sharma -
or just div it with margin:auto;
for a background just add:
background-attachment:fixe d;
background-position:center ;Comment
-
NetDynamic: That's the best solution for centering something horizontal, and doesn't work when you want to center something vertically.Comment
Comment