Site Reference Forums

You are not logged in.

#1 2007-10-17 11:56:22

Seven
Member
From: Tattooine
Registered: 2007-10-05
Posts: 59
I've been thanked 2 times.

Thank me Website
Buy me a beer

Div Display Order Issue

I am working on building this site http://www.bearcreekhardwoods.com 

The layout looks alright for me in Firefox (1024 & 1280) but several div's are hiding in IE 7.0.  They were displaying okay prior to me putting in the PHP includes and turning on the CSS for the links.  I retraced my steps removing the additions but it the display issue remained.  I'm really stumped. 


Misc. Info:

CSS layout/positioning, xhtml transitional
(yes some links are broken - and the footer text isn't aligned yet - it's still in progress)
Built entirely in code view in Dreamweaver 8
PHP includes handle all repeating elements such as top navigation bar, left navigation, and the footer.

Style sheet direct URL http://www.bearcreekhardwoods.com/stylesheets/main.css

Thanks anyone who can help me out - happy to tip for answer. :-)

-Seven


WWW>FORMAT///all

Offline

 

#2 2007-10-17 13:01:00

Northie
Moderator
From: Yorkshire, UK
Registered: 2006-08-19
Posts: 2607
I've been thanked 63 times.

Thank me Website
Buy me a beer

Re: Div Display Order Issue

I don't have IE7 so i can't see what's missing (working on ubuntu)

I can see that you have some empty divs - could these be your problem?

You've got 4 a tags before the doc type and opening html tag

without knowing exactly what's wrong this is all i'm going to give you on this one


Now taking free-lance inquiries; Please contact me for more details
Internet Marketing Books
Promote Yourself on Site Reference!

Offline

 

#3 2007-10-17 14:35:35

MrStitch
Member
Registered: 2006-10-24
Posts: 1079
I've been thanked 12 times.

Thank me 
Buy me a beer

Re: Div Display Order Issue

I don't have any input on this, but I DO want to say..... 'NICE SITE!!!' tummenupp

Offline

 

#4 2007-10-17 14:58:42

Steven_A_S
Member
From: San Antonio, TX
Registered: 2006-08-07
Posts: 449
I've been thanked 21 times.

Thank me Website

Re: Div Display Order Issue

I took a look at the page, and it looks like you have #contentGreen outside of the boundaries of #content using a negative margin.  Now while you should be able to do that, we all know that Internet Explorer doesn't always do what it should.

Have you considered using absolute positioning instead of floats?  Since #wrapperOne is already positioned, any positioning of elements inside it (such as #contentGreen) will be relative to that.  You can set z-index higher to make one element overlap another.  One thing to remember when using positioning like this is that the rest of the page no longer knows where the positioned element is, so won't wrap around it.  This means you'd have to set margins on other elements to keep them from falling underneath the positioned elements.  Positioning may give you more freedom to place those elements as you want them.

For example, you could change the css for #contentGreen to this:

Code: css

#contentGreen {
background:transparent url(../assets/sustainable_forest2.gif) no-repeat scroll left top;
position:absolute;
right:30px;
top:90px;
height:350px;
margin:0;
width:241px;
}

Of course you'd have to do something similar to #contentOptional so that it didn't slip underneath #contentGreen.

Last edited by Steven_A_S (2007-10-17 15:20:37)

Offline

 

#5 2007-10-17 15:57:30

Seven
Member
From: Tattooine
Registered: 2007-10-05
Posts: 59
I've been thanked 2 times.

Thank me Website
Buy me a beer

Re: Div Display Order Issue

Thanks for the feedback.  The odd links at the top are coming in from the PHP, I had been staring at the code in Dreamweaver and hadn't noticed them.  Thanks for pointing that out - I had one page being ported in twice.

I removed that one little PHP include at the top and guess what? FIXED IT!!!! Yippy!!  Very odd it would cause that situation with IE7.

I'll explain a bit why absolutely positioned div's won't work with this layout.  At first I was going to use them for the floating items which makes sense - good suggestion - but the wrapper centers for large screen display (1280x1024+).  When it centers it changes position enough to throw the alignment of absolutely positioned divs off. 

I do have quite a few empty divs for display, I have heard these can cause a problem and to at least put in   in there - does anyone know if this step is necessary? 

Thanks for the feedback!  I'll try to leave a tip if I can figure out how. :-)

-Seven


WWW>FORMAT///all

Offline

 

#6 2007-10-17 16:52:51

Steven_A_S
Member
From: San Antonio, TX
Registered: 2006-08-07
Posts: 449
I've been thanked 21 times.

Thank me Website

Re: Div Display Order Issue

Hmm... object positioning should be relative to a positioned wrapper instead of the whole body.  But as long as you got it working, it doesn't really matter how.

as far as the empty divs, I usually add a   just in case so that the browser doesn't throw out the empty container.  Whether it's needed or not, I couldn't say

Last edited by Steven_A_S (2007-10-17 16:56:02)

Offline

 

#7 2007-10-17 17:25:08

ColoEagle
Administrator
From: Colorado, USA
Registered: 2006-02-15
Posts: 2113
I've been thanked 84 times.

Thank me Website
Buy me candy

Re: Div Display Order Issue

I don't use the   for empty divs.  When I need to have one I give it a set width and height.

Seven wrote:

the wrapper centers for large screen display (1280x1024+).  When it centers it changes position enough to throw the alignment of absolutely positioned divs off.

Have you tried using max-width?

You can have your pages all set to center in the browser.
They will display full screen on smaller browsers  and will be centered in the larger browsers.


The only way to discover the limits of the possible is to go beyond them into the impossible
Attention designers and webmasters - "The Beauty of CSS"
Valid Web Designs tutorials on HTML, XHTML and CSS
Home Security Systems

Offline

 

#8 2007-10-17 18:07:08

Seven
Member
From: Tattooine
Registered: 2007-10-05
Posts: 59
I've been thanked 2 times.

Thank me Website
Buy me a beer

Re: Div Display Order Issue

Hmm, hadn't thought about that.  Is max-width widely supported? I haven't used it - I'll try that tomorrow and let you know how it goes.  I've used min-width and it worked great but only in Firefox.  I now seem to have a problem in IE 6.0 -- gotta love Internet Explorer. 

Thanks everyone for the responses, fix one problem find three more.  It would help if I would stick with the same kind of coding each time but I always seem to have to experiment.  I'll get out the CSS book tomorrow and see if I can make some better mistakes. :-D 

Right now we're about to get some tornadoes and severe thunderstorms - it's looked really wicked out of my office window right now let me tell ya!  This southern girl is going to shut down her computers!

Cheers,

Seven


WWW>FORMAT///all

Offline

 

#9 2007-10-17 18:16:07

ColoEagle
Administrator
From: Colorado, USA
Registered: 2006-02-15
Posts: 2113
I've been thanked 84 times.

Thank me Website
Buy me candy

Re: Div Display Order Issue

The max-width works just like the min-width.

For IE (no surprise there) you have to use an expression.

This is what I use on my security site for the main container;

Code: css

#container {
position:relative;
margin-left:auto;
margin-right:auto;
max-width:1000px;
width:expression(document.body.clientWidth > 1002? "1000px": "auto" );
}

The only way to discover the limits of the possible is to go beyond them into the impossible
Attention designers and webmasters - "The Beauty of CSS"
Valid Web Designs tutorials on HTML, XHTML and CSS
Home Security Systems

Offline

 

#10 2007-10-18 09:12:12

Steven_A_S
Member
From: San Antonio, TX
Registered: 2006-08-07
Posts: 449
I've been thanked 21 times.

Thank me Website

Re: Div Display Order Issue

Seven wrote:

It would help if I would stick with the same kind of coding each time but I always seem to have to experiment.
Seven

Ain't anything wrong with experimenting with code.  It's the designers that don't experiment that I worry about.  It's how I figured out some of the tricks in my pages.

Offline

 

#11 2007-10-18 13:11:55

MarkCCDC
Moderator
From: Deland, FL
Registered: 2005-10-25
Posts: 1270
I've been thanked 20 times.

Thank me Website
Buy me a beer

Re: Div Display Order Issue

Yes, always gotta experiment.

I, too, use no-break spaces in empty divs, but I don't usually have empty divs when I design. A couple of times I've ran across it when skinning some stuff.

As for Internet Explorer, make sure you test IE7 on XP and Vista. Although it bears the same name, the two browsers use different rendering engines and what works in IE7 XP may not behave the same in IE7 Vista.


Mark
Has my advice helped? Thank Me!

Offline

 

#12 2007-10-18 17:37:01

ColoEagle
Administrator
From: Colorado, USA
Registered: 2006-02-15
Posts: 2113
I've been thanked 84 times.

Thank me Website
Buy me candy

Re: Div Display Order Issue

Experimenting,

Is that not what is done every time we do something with CSS and IE. lol

I will usually use an empty div on new designs or when "experimenting".  When I have the page I want I then back up and start removing the empty divs. I have found that a lot of the IE issues will show up this way.

Course you gotta remember that I use FP and all my CSS has to be written by hand. tongue


The only way to discover the limits of the possible is to go beyond them into the impossible
Attention designers and webmasters - "The Beauty of CSS"
Valid Web Designs tutorials on HTML, XHTML and CSS
Home Security Systems

Offline

 
Never
Sponsored Results


Board footer

Powered by PunBB
© Copyright 2002–2008 Rickard Andersson