[Solved] flexible width in FF and IE7 and fixed width in IE6

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
rodeto
Power Poster
Power Poster
Posts: 410
Joined: Thu May 04, 2006 9:12 am

[Solved] flexible width in FF and IE7 and fixed width in IE6

Post by rodeto »

I have been working on this site for a while and I just could not get the width right. In FF and IE7 the min-width of 65em and max-width of 82em are working properly but in IE6 there were problems whatever I tried.
The javascript that is in the standard template did not provide the solution. It just did not seem to work properly so I removed the styles that are in there for IE 6 and I added this to my stylesheet:

* html div#pagewrapper {
   width: 975px;
}

Now my page has the correct fixed width in IE6 and the css and xhtml are validated correct in the W3C Validation Service.
Last edited by rodeto on Sat Aug 02, 2008 3:14 pm, edited 1 time in total.
________________________________
Je gaat het pas zien als je het doorhebt.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: flexible width in FF and IE7 and fixed width in IE6

Post by Dr.CSS »

Are you sure you did the IE js settings correctly?...

It won't take ems just numbers like 700/950  min/max...
rodeto
Power Poster
Power Poster
Posts: 410
Joined: Thu May 04, 2006 9:12 am

Re: flexible width in FF and IE7 and fixed width in IE6

Post by rodeto »

when I change the em settings for the min-width and the max-width in the stylesheet, IE7 and FF change accordingly as far as I can see.
but the IE-js settings, all I did was change the numbers in there for IE6 but that did not change anything for IE6. All that happened was a full screen width no matter what numbers I entered there. That is why I came up with this solution.

But I changed it back and you're free to have a look at it. IE7 and FF look fine but IE6 is fullscreen 1280px instead of the entered values.

edit: I use version 1.4 beta 2 for this one
Last edited by rodeto on Fri Aug 01, 2008 10:53 am, edited 1 time in total.
________________________________
Je gaat het pas zien als je het doorhebt.
sn3p
Forum Members
Forum Members
Posts: 169
Joined: Mon Oct 15, 2007 2:27 pm

Re: flexible width in FF and IE7 and fixed width in IE6

Post by sn3p »

Why use JS if you can do it with CSS? I think the IE6 hack in CSS is a much better solution.

Btw, you import CSSMenu.js twice in your page, no harm done but it's an unnecessary http request.
rodeto
Power Poster
Power Poster
Posts: 410
Joined: Thu May 04, 2006 9:12 am

Re: flexible width in FF and IE7 and fixed width in IE6

Post by rodeto »

@ sn3p  I agree with you that the css hack is much better than using JS. But it bothers me why the JS doesn't work for me. It's in the template so in my opinion it should work but for me it never did.
So I can leave if out totally and use the css hack for setting the width in IE6 and use the min/max-width in the stylesheets for FF and IE7.

and I got rid of the double requested cssmenu.js. Thanks for mentioning. I overlooked it.
________________________________
Je gaat het pas zien als je het doorhebt.
Post Reply

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