Click to See Complete Forum and Search --> : problem viewing


ycpc55
05-30-2009, 03:58 PM
im having a problem i have this code witch will put a menu bar at the bottom of a web page but if you view it in 800 x 600 you can only see half of it but if you view it in 1024 x 786 you can see all of t is there anyway to fix this problem? thanks...{this is not my code}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Bar</title>
<style type="text/css">
body {
margin: 0px;
padding: 0px;
overflow: hidden;
}
#page {
margin: 10px;
overflow: auto;
height: 93%;
}
#bottom {
width: 100%;
background: #18f8f8;
text-align: center;
}
</style>
</head>
<body>
<div id="page">
Other stuff on page
</div>
<div id="bottom">Bottom stuff goes here</div>
</body>
</html>

domainsvault
05-31-2009, 05:58 PM
Browsers are tricky. 100% is deceitful. When the page loads your telling it to load 100% of the width for the viewable area of the browser when it is loading. The browser is being more specific though with some tags at least. So if you load into the page in 1024x768 and then switch res without reloading the page the page is going to stick with the larger scale. As the browser determined on load the viewable area was larger then it may be now at 800x600 may do that in reverse as well loading into 800x600 then switching the 1024x768 may leave the scale smaller. But like I said its tricky sometimes. Anyway over all there is a way to do it. Bare in mind its also browser based, some CSS tags arent supported in some browsers as they are in others. Then theres older vs newer browsers.. and so on..

Heres something I read not to long ago when I was thinking about doing a bar like you speak of..
http://www.sitepoint.com/forums/showthread.php?t=602095 it may be of some help

Y_Less
06-01-2009, 12:09 AM
#page {
margin: 10px;
overflow: auto;
}
#bottom {
width: 100%;
background: #18f8f8;
text-align: center;
position: absolute;
bottom: 0;
}

You were making the bottom bar 7% high, if 7% was smaller than your text then you only saw some of the text.