How do I set the css height on divs to automatically be the same?

Discussion in 'Web Design' started by Glenn, Apr 30, 2012.

to remove all ads.
  1. Glenn

    Glenn Member

    Messages:
    189
    This worked in firefox and even IE but did not work in Chrome.
     
  2. CaldwellYSR

    CaldwellYSR Member

    Messages:
    658
    That's strange... you're right it doesn't work in chrome. I don't know what to tell you.... logically that should work. It looks like in chrome the outerHeight method is pulling the wrong height... maybe you could pull just the regular height and then add whatever padding that main div has to it?
     
  3. Glenn

    Glenn Member

    Messages:
    189
    Not sure how to do that either. I found yesterday that it doesn't work in older versions of IE. Not surprising though.
     
  4. CaldwellYSR

    CaldwellYSR Member

    Messages:
    658
    Sorry... I didn't clarify. You know what padding you're putting on in the CSS and I assume that won't. Change so you could use the .height() method instead of the outerHeight() method for your variable assignment. Then add the necessary padding. I'm on my phone right now so please don't make me write it out ;)
     
  5. Glenn

    Glenn Member

    Messages:
    189
    Is there a way to have a background image for the right side of a div and different one for the left side? I need each to repeat y of coarse. That would solve my problem.
     
  6. CaldwellYSR

    CaldwellYSR Member

    Messages:
    658
  7. Glenn

    Glenn Member

    Messages:
    189
    That seems to work. I'll try it on several browsers and see how often 100px = 100px.
     
  8. Glenn

    Glenn Member

    Messages:
    189
    I believe it looks right in all browsers. Take a look. I'll be moving it to it's proper site soon.
     

Share This Page