IE7 problems with page header!

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
michaywood
Power Poster
Power Poster
Posts: 280
Joined: Thu Apr 15, 2010 12:27 am

IE7 problems with page header!

Post by michaywood »

Hello CMSMSers!

I am working on a layout for a website and have been at a stand still for almost a week now! I think I'm about to lose it! I have a header bar with my navigation links in it and a background image behind it all. It looks perfectly in every browser (using Adobe's Browserlabs to test this) except IE7. I don't know what else to do!

My header template is:

Code: Select all

<div>

<div class="navigation-all">
<div class="header-logo">{cms_selflink dir="start" text="$sitename"}</div>
<div class="site-navigation"><table><tr><td>{menu template='vofmenutemplate'} </td></tr></table></div>
</div>

<div class="header-filler"></div>
<div class="background-image"></div>

<div>
<div class="facebook"><a href="http://www.facebook.com">VOF Facebook Page</a></div>
<div class="twitter"><a href="http://www.twitter.com">VOF Twitter Page</a></div>
</div>
</div>
My header CSS is:

Code: Select all

.navigation-all {
	width:100%;
	height:100px;
	position:absolute;
        margin:0;
}
.background-image {
	background-color:red;
	width:100%;
	height:175px;
	z-index:1;
}
.header-logo a{
	background-image:url('uploads/NCleanBlue/voflogo.png');
	background-repeat:no-repeat;
        text-indent:-9999px;
        display:block;
	width:340px;
	height:100px;
	float:left;
	z-index:350;
}
.site-navigation{
	background-image:url('uploads/NCleanBlue/vofnavbkg.png');
	background-repeat:repeat-x;
        margin-left:340px;
        padding:8px 30px 0 15px;
        display:inline;
	width:400px;
	height:35px;
        position:absolute;
        text-align:left;
	float:left;
	z-index:140;
}
.header-filler{
	background-image:url('uploads/NCleanBlue/vofnavbkg.png');
	background-repeat:repeat-x;
        padding:8px 30px 0 30px;
        display:block;
	width:50%;
	height:35px;
	float:right;
	z-index:140;
}
.facebook a{
	background-image:url('uploads/NCleanBlue/voffb.png');
	background-repeat:no-repeat;
        text-indent:-9999px;
        display:block;
	width:55px;
	height:55px;
	float:right;
	z-index:50;
}
.facebook a:hover{
	background-image:url('uploads/NCleanBlue/voffb.png');
	background-repeat:no-repeat;
        text-indent:-9999px;
        display:block;
	width:55px;
	height:55px;
        -moz-opacity:.70; 
        filter:alpha(opacity=70); 
        opacity:.70; 
	float:right;
	z-index:50;
}

.twitter a{
	background-image:url('uploads/NCleanBlue/voftwitter.png');
	background-repeat:no-repeat;
        text-indent:-9999px;
        display:block;
	width:55px;
	height:55px;
	float:right;
	z-index:50;
}
.twitter a:hover{
	background-image:url('uploads/NCleanBlue/voftwitter.png');
	background-repeat:no-repeat;
        text-indent:-9999px;
        display:block;
	width:55px;
	height:55px;
        -moz-opacity:.70; 
        filter:alpha(opacity=70); 
        opacity:.70; 
	float:right;
	z-index:50;
}

I attached a screen shot of what the error appears to be. It is making the navigation text become center and it is putting a random space after the logo box.

Does anyone have any ideas on how to fix this? I can't seem to move forward to the rest of the website until I get this figured out!

Thanks in advance!
Attachments
Screen shot 2010-08-11 at 5.27.09 PM.png
michaywood
Power Poster
Power Poster
Posts: 280
Joined: Thu Apr 15, 2010 12:27 am

Re: IE7 problems with page header!

Post by michaywood »

if it helps, the website is http://vof.mchaywood.com .

Not only do I have this IE7 problem, I can't get the navigation to space itself out! Any changes I make to the page menu navigation do nothing!
michaywood
Power Poster
Power Poster
Posts: 280
Joined: Thu Apr 15, 2010 12:27 am

Re: IE7 problems with page header!

Post by michaywood »

no one has any ideas on how to do this? or is everyone clueless like I am
maranc
Forum Members
Forum Members
Posts: 249
Joined: Tue May 04, 2010 5:04 pm

Re: IE7 problems with page header!

Post by maranc »

It's looks not good in Firefox 3.6.8 and IE8 (space 340px between .header-logo and page-menu (for your attention: your give for us code with site-navigation class, but on your site is page-menu class.)

Analyze your code and look, that:
1. page-manu has margin-left 340px, this margin is from hader-logo class
2. why you use not hader-logo class but hader-logo a?
3. Code in css is bad, because in top your page you have 3 elements and two has width in pixel, third in 30% (header-filler). On small screen resoution .hader-filler will be not visible or will be visible only fragment.

Best regards,
Marek A.
michaywood
Power Poster
Power Poster
Posts: 280
Joined: Thu Apr 15, 2010 12:27 am

Re: IE7 problems with page header!

Post by michaywood »

I am still learning the best way to do things in CSS. I wanted a header that was the full width of any browser and a background image behind it.

The code of the website is different from what I've posted here because I've been doing some editing over the past week trying to figure out how to do it.

I have the logo as header-logo a because it is a link. If I did it as header-logo then it wouldn't have any of the stylings, like the logo as the background image.

I have the 2 div's as fixed because the logo size is fixed. Then the page-menu area is fixed because, if you have it as a %, if your window is small enough, it'll wrap your navigation onto the next line. I then have a 30% div in hopes that it would fill up the rest of the header correctly, but it isn't working as planned...

Any ideas?
uniqu3

Re: IE7 problems with page header!

Post by uniqu3 »

Hi,

in my opinion you started building the whole header thing wrong.
But as first fix your html comments!
Above is not correct this can also lead to styling problems, depends on browser.
correct:

Now to your problem, try this code, i tried this in firebug and ff 3.6, can't guarantee it will work everywhere but it is a starting point.
/* ------------- HEADER --------------------*/
.full-background{
       background:url('uploads/images/homepageimage/pagebg.jpg') repeat-x;
       position:relative;
 also .page-menu could of been styled for your menu the way you want it and not that additional  .header-filler
Last edited by uniqu3 on Sat Aug 14, 2010 5:26 pm, edited 1 time in total.
maranc
Forum Members
Forum Members
Posts: 249
Joined: Tue May 04, 2010 5:04 pm

Re: IE7 problems with page header!

Post by maranc »

One my help for you: install Opera browser and on your site please right click and select "review elements" - you will see all div with code, for me it's very usefull and help me analyze positioning div's and others element in css.

PS. I have polish version Opera and fraze "review elements" maybe will another in english (it's main sugestion ...)

Marek A.
michaywood
Power Poster
Power Poster
Posts: 280
Joined: Thu Apr 15, 2010 12:27 am

Re: IE7 problems with page header!

Post by michaywood »

thank you guys so much!

uniqu3, that ALMOST did it! I am trying my best to learn this CSS/XHTML world! I just took my first class this year so I'm trying to learn the best ways to do things so I appreciate the help!

That CSS seemed to ALMOST do the trick! From using browserlab.adobe.com I have now looked at the page in every browser and it looks perfect in everything EXCEPT IE7. So close!

The menu isn't visible in IE7. I tried setting .page-menu to position:absolute; and z-index:99; to see if that would make the menu visible but it didn't seem to work!

Any ideas? I'm so pumped! It's almost working! then i have to do the rest of the page... :P

Thanks again!
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: IE7 problems with page header!

Post by Dr.CSS »

Maybe it would help if you didn't use a table based layout...
michaywood
Power Poster
Power Poster
Posts: 280
Joined: Thu Apr 15, 2010 12:27 am

Re: IE7 problems with page header!

Post by michaywood »

I had an entire layout that was nothing but DIVs, but I couldn't get it figured out and no one in here seemed to have any ideas to help. So I just had to resort to making a table layout that got the job done. It isn't pretty, and I really hate to make a table layout, but I couldn't make it work with divs! And it seems like no one else could either!
Post Reply

Return to “Layout and Design (CSS & HTML)”