Thursday, September 22, 2011

How to fix the image position in css irrespective to screen resolution?

the script I've given in the html is:

%26lt;div id=';blue';%26gt;%26lt;img src=';images/graphics/headshot-blue-sml.g?br>


in css the I've given id script is:



#blue{

width:10px;

height:18px;

float:right;

position:absolute;

top:250px;

left:390px;

right:30px;

}



the problem is when I change the screen resolution from 800x600 1024x768 ...the image placement also being changed.. I just want to fix the image position irrespective to screen resolutionHow to fix the image position in css irrespective to screen resolution?
You can't float an object and give it an absolute position. You also can't have both left and right positions in an absolute position.



If you remove the right and float lines, it should work.

No comments:

Post a Comment