Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

background-image not applying? 1

Status
Not open for further replies.

Dakwan

Programmer
Jan 9, 2007
3
CA
A quick question?


I'm working on a site which has two content column divs contained within a parent div. i want the columns to look even so what i'm attempting to do is apply a 1px tall background image to the parent div to 'simulate' the look of it being two even height columns... makes sense to me right?

works beautifully in IE but not at all in Mozilla and Opera. I think it's an issue with having no height defined? if i define an arbitrary height to the parent div it will apply the background up to that height?

quite confused and any help would be appreciated

cheers!

p.s.
is a link to the site but no gaurentees it will work!
 
Given that you gave us no code to work with and left us guessing, I would think (hope) you're using floats to have the columns one next to each other. Unless you have something clearing those floats below (or have overflow: auto; albeit this method does sometimes fail), your floated elements will not expand their parent element. Thus in FF the parent element is zero pixels high. IE wrongly helps out by expanding the parent anyway. Just add an element that clears both beneath the two floated columns and it should work.

If you're working with absolute positioning to achieve the side-by-side effect then the solution will be less simple -- and I would suggest you move to floating.
 
Vragabond marry me :p

Dumbest mistake of my life... i had my clear element outside of the parent div... thanks for the help!
 
Albeit you gave me my 500th star for this forum, which is a beautiful gift ... I'm afraid I'm already married and not from a culture where I can have more than one partner. But you could wait if I get divorced or become part of the monogamist culture. Maybe?
 
[love]


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top