Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
div backgroound image not showing in IE8
Old 09-14-2009, 07:52 PM div backgroound image not showing in IE8
Junior Talker

Posts: 2
Name: Adey
Trades: 0
I'm designing a website and found out when in compatibility mode (IE7 I believe) I can see the background image and bottom-border of a particular div section the way it should be but when in IE8 or Firefox the background image doesn't show and the border-bottom appears at the top instead of bottom.
Here is the css for the divs...

Code:
#mainContent {
 padding: 0 20px; 
 background: #FFFFFF;
 margin-left: 213px;
 width: 780px;
 margin-top:-20px;
}
#mid{
 width:780px;
 background:#fff url(../images/midbg.jpg) repeat-x bottom;
 height:100%;
 border-bottom: 2px solid #CCC;
}
.midLeft{
 width:480px;
 float: left;
 
}
.midLeft p{
 padding: 10px 20px;
 
 text-align:justify;
}
.midRight{
 float: right;
 width:290px;
 border-left: 1px solid #CCC;
 
}
.midRight p{
 padding: 10px 20px;
 text-align:justify;
}
and part of the html
HTML Code:
<div id="mainContent">
    <div id="mid">
       <div class="midLeft">
       <h3 style="padding-left:20px;">Welcome</h3>
    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam,  justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam  ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo  porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis  ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean  sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at,  odio.</p></div>
    <div class="midRight"><p><img src="images/insight.jpg" /></p><p> Donec et ipsum et sapien vehicula nonummy. Suspendisse potenti. Fusce  varius urna id quam. Sed neque mi, varius eget, tincidunt nec, suscipit id,  libero. In eget purus. Vestibulum ut nisl. Donec eu mi sed turpis feugiat  feugiat. Integer turpis arcu, pellentesque eget, cursus et, fermentum ut,  sapien. Fusce metus mi, eleifend sollicitudin, molestie id, varius et, nibh.  Donec nec libero.</p></div>
    </div>
    <br class="clearFloat" />
    <p>&nbsp;</p>
    <div id="bottom">
    <hr width="100%" /><br />
     <div class="bottomLeft">
    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam,  justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam  ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo  porttitor, felis. </p></div>
    <div class="bottomRight"><p>Nam blandit quam ut lacus. Quisque ornare risus quis  ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean  sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio.</p></div>
    </div>
 <!-- end #mainContent --><br clear="left" /></div>
royald is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-15-2009, 01:53 PM Re: div backgroound image not showing in IE8
StylaStyla's Avatar
Mad Man

Posts: 401
Name: Styla
Location: City of London
Trades: 0
it could be because your #mid hasn't floated where as the other elements are.

It'd be easier to diagnose if you could provide a link.
__________________
Freelance Graphic Designer not for hire
StylaStyla is offline
Reply With Quote
View Public Profile Visit StylaStyla's homepage!
 
Old 09-15-2009, 08:25 PM Re: div backgroound image not showing in IE8
vangogh's Avatar
Post Impressionist

Posts: 10,688
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
Try wrapping quotes around the background image URL. Also I think bottom needs to come before the repeat-x

background:#fff url("../images/midbg.jpg") bottom repeat-x;
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 09-16-2009, 11:46 AM Re: div backgroound image not showing in IE8
Junior Talker

Posts: 2
Name: Adey
Trades: 0
Thanks all for your input. I fixed it by moving the <br class="clearfloat"> to the closing #div for mid.
royald is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to div backgroound image not showing in IE8
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.21217 seconds with 12 queries