Blank space when window size is reduced
Posted: 24 May 2008 05:21 PM   [ Ignore ]
Newbie
Rank
Total Posts:  9
Joined  2008-05-23

Hey everyone, I am working on this website for a class and everything seems to be working fine except when I reduce the size of the window to less than the width of the image in my “main” div, it leaves this blank space to the right of my header and footer images that are supposed to take up 100% of the window. Any idea how to fix this?

Website:
http://alexmel7.site88.net/Exercise 5 Part 1/index2.html

CSS:

body {
background
-color#000000;
margin0px;
}
#content {
width679px;
margin-left: -340px;
padding-left50%;
}
#header {
positionabsolute;
top0px;
left0px;
background-imageurl(images/headerbar.png);
width100%;
height54px;
}
#menu {
positionrelative;
background-imageurl(images/menubar.png);
width209px;
height277px;
padding-left25px;
margin-left430px;
background-repeatno-repeat;
}
#main {
background-imageurl(images/mainimage.png);
width679px;
height255px;
background-repeatno-repeat;
}
.mainp {
position
relative;
top: -225px;
left60px;
color#ffffff;
font-family"Myriad Pro""Trebuchet MS"Helveticasans-serif;
font-size37px;
line-height43px;
}
#footer {
background-imageurl(images/footerbar.gif);
width100%;
height154px;
Profile
 
 
Posted: 27 May 2008 01:39 PM   [ Ignore ]   [ # 1 ]
Jr. Member
RankRank
Total Posts:  36
Joined  2008-01-11

add “min-width” to the wrapper body with your value in there.

Profile
 
 
Posted: 27 May 2008 02:31 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  9
Joined  2008-05-23

Thanks! min-width seems to work.

Profile
 
 
Posted: 27 May 2008 03:16 PM   [ Ignore ]   [ # 3 ]
Jr. Member
RankRank
Total Posts:  36
Joined  2008-01-11

leave the width declaration as well, in this order:

width
min-width


IE does not play well with min-width, so it will take the width and expand it if it needs to, per content.

Profile