Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 CSS margin problem with IE
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Adjunkten
Starting Member

30 Posts

Posted - 01 July 2008 :  02:14:52  Show Profile  Visit Adjunkten's Homepage  Reply with Quote
I have site integrated my forum but body margins won't work in IE7. It looks fine in Firefox and Opera.

My body-CSS:

body { max-width: 1000px;
min-width: 800px;
margin: 0 auto;}

I suspect the tablecode is causing the problem, since margins are OK on pages outside my forum folder. I tried to "css" the table without succes. Do you know the trick?

http://www.adjunkten.dk/forum/default.asp

<moved from="Help: General / Current Version (v3.4.xx)" by="Shaggy" /><

Edited by - Adjunkten on 01 July 2008 05:27:41

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 01 July 2008 :  03:22:05  Show Profile  Visit MarcelG's Homepage  Reply with Quote
Max-width and Min-width are not supported in IE afaik.
I've worked around this by using an expression:

.maxw {
margin-left: auto;
margin-right: auto;
max-width:1000px; 
width:expression(document.body.clientWidth > 1000? "1000px": "auto" );  
visibility: visible;
text-align: center;}

I'm not sure what the min-width replacement should be, as the code I use only does something with the max-width, but it'll give you an idea to start off with.<

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 01 July 2008 06:03:34
Go to Top of Page

Adjunkten
Starting Member

30 Posts

Posted - 01 July 2008 :  04:02:20  Show Profile  Visit Adjunkten's Homepage  Reply with Quote
Thankyou, but it doesn't work. Your code is in my css now.

<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 01 July 2008 :  05:51:54  Show Profile  Visit HuwR's Homepage  Reply with Quote
ok, strictly speaking you should not be assigning width attributes to the body tag, add a page container div and size that instead. it does not make sense to size the body tag since the body tag corresponds to the browser window.<
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 01 July 2008 :  06:03:18  Show Profile  Visit MarcelG's Homepage  Reply with Quote
Oops, that's right ; in my CSS the above CSS style is not assigned to body, but to a div called maxw.
I've put all content in that div.
Reference: http://oxle.com/uploaded/screen.css<

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 01 July 2008 :  06:15:01  Show Profile  Visit HuwR's Homepage  Reply with Quote
also to set a min-width that works in IE6 and below, use the following.

.maxw {
margin-left: auto;
margin-right: auto;
width:auto !important;
width:800px;

max-width:1000px;
width:expression(document.body.clientWidth > 1000? "1000px": "auto" );
visibility: visible;
text-align: center;}

that will use auto for the width in FF/IE7 and 800px for the width in IE6 (width in IE6 is allways it's min-width)

also, IE6 does not support margin-auto so you need to do the following
body {text-align: center}
.maxw {
margin-left: auto;
margin-right: auto;
width:auto !important;
width:800px;
max-width:1000px;
width:expression(document.body.clientWidth > 1000? "1000px": "auto" );
visibility: visible;
text-align: left;}<
Go to Top of Page

Adjunkten
Starting Member

30 Posts

Posted - 01 July 2008 :  06:18:45  Show Profile  Visit Adjunkten's Homepage  Reply with Quote
Thankyou for your time.

I added a .container with the width specs to the css and added "<div class="container">" in the top of my inc_site_header.


IE still stretches width to fit screen size, which looks stupid on widescreen .

<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 01 July 2008 :  06:23:56  Show Profile  Visit HuwR's Homepage  Reply with Quote
what version of IE are you using, I know this works in IE as I use it all the time, so there must be something wrong in your page<
Go to Top of Page

Adjunkten
Starting Member

30 Posts

Posted - 01 July 2008 :  06:24:30  Show Profile  Visit Adjunkten's Homepage  Reply with Quote
quote:
Originally posted by HuwR

also to set a min-width that works in IE6 and below, use the following.

.maxw {
margin-left: auto;
margin-right: auto;
width:auto !important;
width:800px;

max-width:1000px;
width:expression(document.body.clientWidth > 1000? "1000px": "auto" );
visibility: visible;
text-align: center;}

that will use auto for the width in FF/IE7 and 800px for the width in IE6 (width in IE6 is allways it's min-width)




Tried that too in .container. Only resizes topbar.

Maybe I have to consider another design, and this time start with IE. GRRR.<
Go to Top of Page

Adjunkten
Starting Member

30 Posts

Posted - 01 July 2008 :  06:27:28  Show Profile  Visit Adjunkten's Homepage  Reply with Quote
Huwr, I use IE7, vers. 7.0.5730.13.

What I don't understand is the difference between FF and IE.
Doesn't IE7 respect W3C standards?<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 01 July 2008 :  06:28:14  Show Profile  Visit HuwR's Homepage  Reply with Quote
what do you mean by it only sizes the topbar? this would indicate you haven't put the closing div tag in the correct place maybe<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 01 July 2008 :  06:29:25  Show Profile  Visit HuwR's Homepage  Reply with Quote
yes IE7 should not give you a problem, howvere as I stated above width is NOT an attribute for body, if FF interprets it as such then it is FF that is not complying with the standards.<
Go to Top of Page

Adjunkten
Starting Member

30 Posts

Posted - 01 July 2008 :  06:29:44  Show Profile  Visit Adjunkten's Homepage  Reply with Quote
Here's my inc_site_header:

<div class="container">
<div class="topbar">
<div class="adjunkten">Adjunktens forum</div>
<div class="righttop"><div class="afterdark">after dark</div></div>
<div class="topmenu"><!--#include virtual="/inctopmenu"---></div>
</div><
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 01 July 2008 :  06:32:35  Show Profile  Visit HuwR's Homepage  Reply with Quote
quote:
Originally posted by Adjunkten

Here's my inc_site_header:

<div class="container">
<div class="topbar">
<div class="adjunkten">Adjunktens forum</div>
<div class="righttop"><div class="afterdark">after dark</div></div>
<div class="topmenu"><!--#include virtual="/inctopmenu"---></div>
</div>


ok, so where is the closing </div> for container, is this in your inc_site_footer ?<
Go to Top of Page

Adjunkten
Starting Member

30 Posts

Posted - 01 July 2008 :  06:51:01  Show Profile  Visit Adjunkten's Homepage  Reply with Quote
Yup. Site footer:

</div>
<div id="kontaktoplysninger">
<!--#include virtual="/inc_bund"--->
</div>
<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 01 July 2008 :  06:57:14  Show Profile  Visit HuwR's Homepage  Reply with Quote
I'm afraid you will need to get some help from Image forums as you are using their version of the forum not a base version, so unfortunately I can not comment on the markup/code used in your forum.<
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 1.93 seconds. Powered By: Snitz Forums 2000 Version 3.4.07