HighDots Forums  

Re: How do I do a layout with 100% width minus padding on left and right?

alt.html alt.html


Discuss Re: How do I do a layout with 100% width minus padding on left and right? in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tony M
 
Posts: n/a

Default Re: How do I do a layout with 100% width minus padding on left and right? - 09-07-2005 , 01:10 PM






On Tue, 6 Sep 2005 17:22:57 -0700, Neredbojias
<neredbojias (AT) neredbojias (DOT) com> wrote:

Quote:
Nope. You should use the "strict" doctype and only pad the inner
content div, not the outer. If you set the outer content div to
width:100% *and* pad it, it's effective width is >100%.
Well, I followed your suggestions, and further changed my css so that
I set the margin instead of the padding and it works in IE, Opera and
Avant. However, Mozilla and Netscape still give me headaches. I
suppose the best I can do is to use browser detection code (though
even that isn't 100% foolproof) and have different css files.

Thanks for your help.

Tony


Reply With Quote
  #2  
Old   
Alan J. Flavell
 
Posts: n/a

Default Re: How do I do a layout with 100% width minus padding on left andright? - 09-07-2005 , 03:19 PM







On Wed, 7 Sep 2005, Tony M wrote:

Quote:
suppose the best I can do is to use browser detection code
Heavens, no! If you had the skill and expertise to do that well (which I
freely admit I have not), you would be clever enough to solve the problem
with CSS alone.

I've seen countless attempts at browser detection. Every one of them was
fundamentally flawed. Many of them were worse than that.

If there's /really/ no other way (which, with some old browsers and
versions, was, I admit, inevitable for any serious work) then the kind of
approach shown in http://w3development.de/css/hide_css_from_browsers/ is
genial, in as much as it capitalises on known bugs in the browsers
themselves - so, everyone gets sent the same document (and it's
correspondingly cacheable) - your server has no need to know what browser
it's serving (so, cache proxies are no problem) - there's no need to
assume that every user has javascript enabled (which quite a few of them
surely haven't), and so: it hits every instance of the browser bug which
it targets, and causes no harm to the rest. Which is spot on.

So much for buggy browsers. But Mozilla, and other browsers based on it
(modern Netscapes, Firefox etc.) are pretty close to being specification-
conforming, so, if you can't get them to behave, you really shouldn't be
resorting to techniques intended for buggy browsers. At least, not until
Bugzilla tells you that indeed it's an acknowledged bug (of which there
now seem to be relatively few - compared to the considerable number of
non-bugs reported by well-intentioned but misguided authors when they
found Mozilla doing what they asked for, instead of what they hoped for!).

best wishes


Reply With Quote
  #3  
Old   
Beauregard T. Shagnasty
 
Posts: n/a

Default Re: How do I do a layout with 100% width minus padding on left andright? - 09-07-2005 , 06:01 PM



Tony M wrote:
Quote:
I suppose the best I can do is to use browser detection code
(though even that isn't 100% foolproof) and have different css
files.
I have never found that necessary. You must have some errors somewhere.

--
-bts
-This space intentionally left blank.


Reply With Quote
  #4  
Old   
Tony M
 
Posts: n/a

Default Re: How do I do a layout with 100% width minus padding on left and right? - 09-07-2005 , 06:48 PM



On Wed, 07 Sep 2005 22:01:07 GMT, "Beauregard T. Shagnasty"
<a.nony.mous (AT) example (DOT) invalid> wrote:

Quote:
Tony M wrote:
I suppose the best I can do is to use browser detection code
(though even that isn't 100% foolproof) and have different css
files.

I have never found that necessary. You must have some errors somewhere.
Oh, I'm sure I do

Tony


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.