Trying to overlap divs in CSS - IE7 problem

Thread Solved

Join Date: May 2008
Posts: 27
Reputation: xylude is an unknown quantity at this point 
Solved Threads: 0
xylude xylude is offline Offline
Light Poster

Trying to overlap divs in CSS - IE7 problem

 
0
  #1
Aug 21st, 2009
I am working on a website (http://www.jasonacrider.com/meisseTe...ess/index.html) and it looks right in Firefox (of course) but IE doesn't want to let the DIV's overlap the way I want them to - it just keeps pushing it under the floating div on the right and centering it.

Can anyone check out my stylesheet at http://www.jasonacrider.com/meisseTe...ess/styles.css and let me know if or what I can do to make this work?

I have a plan b, but I would prefer to do it this way if I can.
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 348
Reputation: Troy III will become famous soon enough Troy III will become famous soon enough 
Solved Threads: 42
Troy III's Avatar
Troy III Troy III is offline Offline
Posting Whiz

Re: Trying to overlap divs in CSS - IE7 problem

 
0
  #2
Aug 22nd, 2009
You should correct your HTML errors first
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 27
Reputation: xylude is an unknown quantity at this point 
Solved Threads: 0
xylude xylude is offline Offline
Light Poster

Re: Trying to overlap divs in CSS - IE7 problem

 
0
  #3
Aug 22nd, 2009
All 3 minor html goofs are fixed, but your reply really had nothing to do with my question. Regardless, I am just gonna go with plan b and make the background for the div in question part of the background image since I am strapped for time to get this project done.
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 348
Reputation: Troy III will become famous soon enough Troy III will become famous soon enough 
Solved Threads: 42
Troy III's Avatar
Troy III Troy III is offline Offline
Posting Whiz

Re: Trying to overlap divs in CSS - IE7 problem

 
1
  #4
Aug 22nd, 2009
Here,

First thing you should do is to remove your script from HTML element and place it somewhere before HEADER element closure.

Second:
Something on the right should follow something on its left, not the opposite, this adds confusion.
Put your HTML back to its normal order of its rendering flow, like this:

HTML and CSS Syntax (Toggle Plain Text)
  1. <DIV class=body>
  2.  
  3. <DIV class=bodyTxt>
  4. <DIV class=bodyTxtInner>
  5. <H1>HOME</H1>
  6. <P>Gary Jones and Rick Taylor are the owner/operators (under the direct
  7. supervision of their wives Janice and Carol) of the
  8. <SPAN class=yellow><STRONG>
  9. Cypress Hill Winery</STRONG></SPAN>.
  10. The current location
  11. was opened in June, 2009.</P>
  12. <P>This small urban winery is in the lower level of an old sandstone and brick
  13. building located in the downtown Carrousel District of Mansfield, OH. This is a
  14. true wine cellar where the tasting room is situated in the midst of a working
  15. winery. The exposed stone walls, the oak wine barrels and the rustic
  16. surroundings all contribute to the ambiance and relaxing atmosphere.
  17. </P>
  18. </DIV>
  19. </DIV>
  20.  
  21. <DIV class=floatyImg>
  22. <IMG height=362 src="images/hompageImages.png" width=400>
  23. </DIV>
  24.  
  25. </DIV>
So you won't need the "z-index" anymore.

Third, - the CSS:
.body {
	background: url("images/BG.png"); 
	overflow: auto; 
	width: 100%; 
	height: 379px; }

.bodyTxt {
	padding: 5px 0 5px 10px;
	background: url("images/bodyBg.png"); 
	width: 400px; 
	color: #fff; 
	-moz-border-radius: 20px; 
	-webkit-border-radius: 20px;
	position: absolute;
	margin:10px; /* optional */}

.floatyImg {
	float: right;
	width: 400px; 
	position: relative;
	margin-right: 20px; }

.bodyTxtInner {
	padding: 0 0 0 15px; /* optional */
	width: 265px }
additionally
.separator {
	background: url("images/separator.png"); 
	height: 11px;
	overflow:hidden; /* required */

@ element .outer , you should remove "text-align: center"
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 27
Reputation: xylude is an unknown quantity at this point 
Solved Threads: 0
xylude xylude is offline Offline
Light Poster

Re: Trying to overlap divs in CSS - IE7 problem

 
0
  #5
Aug 22nd, 2009
Troy III,

I really appreciate all the help! I decided to go ahead with plan b anyways - but the advice did help some.
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 348
Reputation: Troy III will become famous soon enough Troy III will become famous soon enough 
Solved Threads: 42
Troy III's Avatar
Troy III Troy III is offline Offline
Posting Whiz

Re: Trying to overlap divs in CSS - IE7 problem

 
0
  #6
Aug 22nd, 2009
Originally Posted by xylude View Post
Troy III,

I really appreciate all the help! I decided to go ahead with plan b anyways - but the advice did help some.
I never knew you were fighting with your deadline, and was not ready to examine your css, before correcting html problems - simply because it is impossible to control the css content interpretation with a broken structure.

But soon after I realized that those 11 html errors reported were all caused by improper placing of your script inside the html element. And since these errors are forgiven and corrected by most of the browsers - I decided to look further in the code.
I noticed that switch of appearing divs you made. But that was just the half of the problem solved.
Than I looked in your CSS and found that both elements are floated and relatively positioned. It worked in FX by accident and only because of a bug known as content bleed-in/out of element containers there. Otherwise floating elements should drop down as soon as there is not enough space to fit them all.

The code I provided will work perfectly in all agents supporting float and positioning...

You can go with your plan B, but I wouldn't recommend it - your page is already too heavy for that near 600 bytes of content. While on the other side your server is equally slow. In addition, you have >27KB of dense javascript code just to make them corners appear round. And your images are too heavy already...

And again it's your choice...
p.s.:
I happen to look at your new code and realize that you've already implemented my solution suggestions...

Thanks for your feedback.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC