chiprivers Posted November 19, 2006 Share Posted November 19, 2006 I am relatively new to using CSS for layout purposes, but I have read several tutorials and understand the basic concept. I having trouble getting to grips with the dimension of elements. If I want to specify a specific size for an element, for example a <div>, why does it not adopt the size height I have specified?I have a div with the following css code:#frame { /* main page frame */width: 800px;min-height: 100px;margin-left: auto;margin-right: auto;background-color: #ffffff}I expected the div to display at the minimum height of 100px but it doesn't! When there is no content in the div it only displays at a height equal to one row of text. If I add some content it expands to the height of the content I have added. How do I get an elemenet to display at an exact height whether there is or is not any content within it? Unless I can get my head around this bit of CSS I think I am going to become unstuck trying to use CSS for positioning so any assistance would be appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/27789-div-size-and-blank-space/ Share on other sites More sharing options...
AndyB Posted November 19, 2006 Share Posted November 19, 2006 Not all browsers support all CSS declarations. min-height is not supported with IE6. Quote Link to comment https://forums.phpfreaks.com/topic/27789-div-size-and-blank-space/#findComment-127156 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.