dpacmittal Posted March 30, 2009 Share Posted March 30, 2009 I am making a chat site and I have basically 3 divs for displaying the messages, user list, and a textarea to send messages. These were positioned absolute and were looking fine until I viewed the site on another computer with different resolution. Also I had set the height and width in pixels but that again was a problem if I viewed the site on another computer. I started setting the height and width in percent but it isn't working. Width was working fine but height is not working. What am I doing wrong? I set the height and width both to 80%. edit: When absolute positioning was still enabled, it was working but when I removed it, it stopped rendering the current height. Sorry, if this question is too stupid. Quote Link to comment Share on other sites More sharing options...
haku Posted March 30, 2009 Share Posted March 30, 2009 You don't want to position your main elements (the wireframe) with absolute positioning, for the very reason you discovered. You can set height as an explicit value in pixels, but not in percents. Quote Link to comment Share on other sites More sharing options...
dpacmittal Posted March 30, 2009 Author Share Posted March 30, 2009 You can set height as an explicit value in pixels, but not in percents. I know it can be an explicit value but that wouldn't look correct in different resolutions, would it? Isn't there a workaround for this? Quote Link to comment Share on other sites More sharing options...
seaweed Posted March 30, 2009 Share Posted March 30, 2009 People who use giant monitors get used to stuff looking smaller. I design my sites so that it all fits in a 1024x768 screen but looks best in a 1440x900 or so. Try playing with min-height: and min-width: As far as the 80%, it has to be 80% of something, like its container. Make sure the container has a height value, I believe the body will default to just screen size. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.