Connecting Tech Pros Worldwide Help | Site Map

IE not minding margin-right RSS Feed

 
LinkBack Thread Tools Search this Thread
  #1  
Old June 27th, 2008, 07:19 PM
David Schwartz
Guest
 
Posts: n/a
Default IE not minding margin-right RSS Feed

I've got a sidebar element that's a floating div. To the left of this
div, there are p's each with a margin-right set as well as overflow:
auto set (see below)). Some of the p's are of class 'subhead'. In FF2,
all of these elements obediently mind the left margin of the sidebar.
In IE, however, the subheads do not and run underneath the sidebar.
Any ideas why?

The css is as follows:

..subhead {
background-color: #D6ECF3;
color: black;
font-size: 90%;
font-weight: bold;
line-height: 20px;
margin-bottom: 10px;
}

P {
margin-left: 10px;
margin-right: 20px;
font-size: 12pt;
overflow: auto;
}

The sidebar has the following style:
overflow: auto; padding-left:10px; margin-top:10px; margin-bottom:
10px; margin-right: 10px

TIA,
David

  #2  
Old June 27th, 2008, 07:19 PM
John Hosking
Guest
 
Posts: n/a
Default Re: IE not minding margin-right RSS Feed

David Schwartz wrote:
Quote:
I've got a sidebar element that's a floating div. To the left of this
div, there are p's each with a margin-right set as well as overflow:
auto set (see below)). Some of the p's are of class 'subhead'. In FF2,
all of these elements obediently mind the left margin of the sidebar.
In IE, however, the subheads do not and run underneath the sidebar.
Any ideas why?
Yes, several. But first (apologies to all those who are tired of the
same old questions):

URL? (Please don't paste a bunch of incomplete code.)
Doctype? (Are you inciting Quirks mode [q.g.]?)
Which IE? 6? 7? 3.01?
What do you think "the left margin of the sidebar" is that the p
elements are supposed to mind?
Quote:
>
The css is as follows:
>
.subhead {
background-color: #D6ECF3;
color: black;
font-size: 90%;
font-weight: bold;
line-height: 20px;
See, for example, the thread from a week ago starting with the post
<e9bece37-7424-4387-aa88-0561e05d8436@e39g2000hsf.googlegroups.comor
simply adopt the <numbervariant described at
http://www.w3.org/TR/CSS21/visudet.h...ef-line-height.
Quote:
margin-bottom: 10px;
}
>
P {
margin-left: 10px;
margin-right: 20px;
font-size: 12pt;
Please not in points (unless you're printing). Please not so small.
Especially if you're going to make something called .subhead (surely a
heading of some kind) to be only 90% of this size. And note that you've
asked for a line-height in *pixels* to go with a font-size in *points*.
Quote:
overflow: auto;
}
>
The sidebar has the following style:
overflow: auto; padding-left:10px; margin-top:10px; margin-bottom:
10px; margin-right: 10px
Inline, I'm guessing, but why? And again, where's the left margin which
must be obeyed?


--
John
Pondering the value of the UIP: http://improve-usenet.org/
  #3  
Old June 27th, 2008, 07:19 PM
David Schwartz
Guest
 
Posts: n/a
Default Re: IE not minding margin-right RSS Feed

URL? (Please don't paste a bunch of incomplete code.)
Sorry but I don't have a freely accessible web server at my
disposal
Quote:
Doctype? (Are you inciting Quirks mode [q.g.]?)
See the markup below
Quote:
Which IE? 6? 7? 3.01?
IE7
Quote:
What do you think "the left margin of the sidebar" is that the p
elements are supposed to mind?
Why does there have to be a margin set for the sidebar? This, btw,
did the trick but I don't understand why it's necessary.
Quote:
>
>
>
Quote:
The css is as follows:
>
Quote:
.subhead {
background-color: #D6ECF3;
color: black;
font-size: 90%;
font-weight: bold;
line-height: 20px;
>
See, for example, the thread from a week ago starting with the post
<e9bece37-7424-4387-aa88-0561e05d8...@e39g2000hsf.googlegroups.comor
simply adopt the <numbervariant described athttp://www.w3.org/TR/CSS21/visudet.html#propdef-line-height.
>
Quote:
margin-bottom: 10px;
}
>
Quote:
P {
margin-left: 10px;
margin-right: 20px;
font-size: 12pt;
>
Please not in points (unless you're printing). Please not so small.
Especially if you're going to make something called .subhead (surely a
heading of some kind) to be only 90% of this size. And note that you've
asked for a line-height in *pixels* to go with a font-size in *points*.
>
Quote:
overflow: auto;
}
>
Quote:
The sidebar has the following style:
overflow: auto; padding-left:10px; margin-top:10px; margin-bottom:
10px; margin-right: 10px
>
Inline, I'm guessing, but why? And again, where's the left margin which
must be obeyed?
Actually, this is applied to a div.
Quote:
>
Thanks for your help!

David

  #4  
Old June 27th, 2008, 07:19 PM
Bergamot
Guest
 
Posts: n/a
Default Re: IE not minding margin-right RSS Feed


David Schwartz wrote:
Quote:
Quote:
>URL? (Please don't paste a bunch of incomplete code.)
Sorry but I don't have a freely accessible web server at my
disposal
Sure you do. Does your ISP give you any free space? Did you google for
"free web server"? There's always yahoo/geocities if you're desperate.

Sorry, but nobody wants to read a bunch of code embedded in a post. Find
a publicly accessible server and upload a test page. Do be sure to
validate your code to eliminate syntax errors as a cause of rendering
issues.

Make it as easy as possible for us to help you, and you'll get a much
better response. Posting code is not the way. Posting a URL is.

--
Berg
  #5  
Old June 27th, 2008, 07:19 PM
John Hosking
Guest
 
Posts: n/a
Default Re: IE not minding margin-right RSS Feed

David Schwartz wrote:
[but trimmed the attributions, which I'll now try to re-add -JH]
Quote:
John Hosking wrote:
Quote:
>David Schwartz wrote:
Quote:
Quote:
>URL? (Please don't paste a bunch of incomplete code.)
Sorry but I don't have a freely accessible web server at my
disposal
Geez, everybody else in the world does. ;-)
Quote:
>
Quote:
>Doctype? (Are you inciting Quirks mode [q.g.]?)
See the markup below
Well, I *did* see the markup below, and there wasn't any doctype
declaration, which is why I asked, but there wasn't any <heador <html>
or <bodyor <title>, either, so I had to ask. If you post a URL (yes,
there are free servers available, if you look, and if for some reason
you really can't use "your" server), then the doctype or lack of it is
evident for all. Pasted code snippets don't tell the whole story.

Quote:
Quote:
>What do you think "the left margin of the sidebar" is that the p
>elements are supposed to mind?
Why does there have to be a margin set for the sidebar? This, btw,
did the trick but I don't understand why it's necessary.
It's not clear what did the trick (what's "this", exactly), but I don't
see what you're confused about here. You want some left margin to be
recognized, but you don't say what it is. Presumably, you added one, and
that's what made it be recognized. Isn't that self-explanatory? Or what
am I misunderstanding?

[...other stuff, trimmed, because neither of us has anything more to say
about it...]
Quote:
>
Thanks for your help!
YW

--
John
Pondering the value of the UIP: http://improve-usenet.org/
  #6  
Old June 27th, 2008, 07:20 PM
David Schwartz
Guest
 
Posts: n/a
Default Re: IE not minding margin-right RSS Feed

The issue was that it wasn't minding the margin-right (see the
subject). Don't all elements have an implicit margin? What I'm
confused about is why the margin-right on the left divs worked only
when I specified a margin-left for the right div.

In any case, thanks for your help. Also, I'll post urls in the future.

David
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.