Author |
Topic  |
Adjunkten
Starting Member
30 Posts |
Posted - 01 July 2008 : 02:14:52
|
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
|
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 |
 |
|
Adjunkten
Starting Member
30 Posts |
Posted - 01 July 2008 : 04:02:20
|
Thankyou, but it doesn't work. Your code is in my css now.
< |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 01 July 2008 : 05:51:54
|
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.< |
 |
|
MarcelG
Retired Support Moderator
    
Netherlands
2625 Posts |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 01 July 2008 : 06:15:01
|
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;}< |
 |
|
Adjunkten
Starting Member
30 Posts |
Posted - 01 July 2008 : 06:18:45
|
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 .  < |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 01 July 2008 : 06:23:56
|
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< |
 |
|
Adjunkten
Starting Member
30 Posts |
Posted - 01 July 2008 : 06:24:30
|
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.< |
 |
|
Adjunkten
Starting Member
30 Posts |
Posted - 01 July 2008 : 06:27:28
|
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?< |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 01 July 2008 : 06:28:14
|
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< |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 01 July 2008 : 06:29:25
|
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.< |
 |
|
Adjunkten
Starting Member
30 Posts |
Posted - 01 July 2008 : 06:29:44
|
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>< |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 01 July 2008 : 06:32:35
|
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 ?< |
 |
|
Adjunkten
Starting Member
30 Posts |
Posted - 01 July 2008 : 06:51:01
|
Yup. Site footer:
</div> <div id="kontaktoplysninger"> <!--#include virtual="/inc_bund"---> </div> < |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 01 July 2008 : 06:57:14
|
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.< |
 |
|
Topic  |
|