•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 397,784 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,397 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 1093 | Replies: 2
![]() |
Hia,
I know I've read the answer to this but can't find it again.
Within my content box I have a graphical div to illustrate the heading.
For some reason in IE the background image overflows beyond the content box (which is floated, if that's relevant). And just as strangely it stops overflowing if you resize the browser window.
It works fine in Firefox.
My "display:block" is only there because I thought that might have been the weird answer to the problem.
You can see what I mean here
business directory on my site
same applies in the accommodation section.
As ever your help is much appreciated.
Russell
I know I've read the answer to this but can't find it again.
Within my content box I have a graphical div to illustrate the heading.
.VillageShop, .Accommodation {display:block;
padding:0px;
margin:0px;
height:100px;
width:97%;
text-align: center;
overflow: hidden;
}
.VillageShop {
background-image:url(../../../images/SiteImages/BarnBricks.gif);
}
.Accommodation {
background-image:url(../../../images/SiteImages/BizCategories/Accommodation/landhorizon3.jpg);
}It works fine in Firefox.
My "display:block" is only there because I thought that might have been the weird answer to the problem.
You can see what I mean here
business directory on my site
same applies in the accommodation section.
As ever your help is much appreciated.
Russell
.VillageShop, .Accommodation, .Restaurants {
padding:0px;
margin:0px;
height:1%;
width:97%;
text-align: center;
overflow: hidden;
}
.VillageShop {
background-image:url(../../../images/SiteImages/BarnBricks.gif);
}
.Accommodation { background-image:url(../../../images/SiteImages/BizCategories/Accommodation/landhorizon3.jpg);
}
.Restaurants {
background-image:url(../../../images/SiteImages/BizCategories/Restaurants/RestHorizonSheepBack2.gif);
}
.VillageShop img {height:75%;
padding-top:12px;
overflow: hidden;
padding-bottom:10px;
}
.Accommodation img.catPhoto{height:55%;
padding-top:7px;
padding-bottom:80px;
overflow: hidden;
}
.Restaurants img.catPhoto{height:51%;
padding-top:60px;
padding-bottom:5px;
overflow: hidden;
}I tracked down answer which was the need to define {height:1% }.
This 1% becomes meaningless when the height of the box gets its new definition from the padded images I used, but for some reason it stops IE spilling the background.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
- Background question (JavaScript / DHTML / AJAX)
- Help with CSS - background extending to 100% (HTML and CSS)
- IE 6 all pages white background, font sizes erratic (Web Browsers)
- desktop background hijacked: (Viruses, Spyware and other Nasties)
- How do i set a page background color? (HTML and CSS)
- IE6 - Not displaying background colours... (Web Browsers)
Other Threads in the HTML and CSS Forum
- Previous Thread: Conveyor belt slideshow script - with buttons?
- Next Thread: Changing the color of the bullet in the <li> tag


Linear Mode