472,958 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

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
Jun 27 '08 #1
5 1990
David Schwartz wrote:
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?
>
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
<e9**********************************@e39g2000hsf. googlegroups.comor
simply adopt the <numbervariant described at
http://www.w3.org/TR/CSS21/visudet.h...ef-line-height.
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*.
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/
Jun 27 '08 #2
URL? (Please don't paste a bunch of incomplete code.)
Sorry but I don't have a freely accessible web server at my
disposal
Doctype? (Are you inciting Quirks mode [q.g.]?)
See the markup below
Which IE? 6? 7? 3.01?
IE7
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.
>

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-0561e05d8...@e39g2000hsf.googlegroups.comor
simply adopt the <numbervariant described athttp://www.w3.org/TR/CSS21/visudet.html#propdef-line-height.
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*.
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?
Actually, this is applied to a div.
>
Thanks for your help!

David

Jun 27 '08 #3

David Schwartz wrote:
>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
Jun 27 '08 #4
David Schwartz wrote:
[but trimmed the attributions, which I'll now try to re-add -JH]
John Hosking wrote:
>David Schwartz wrote:
>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. ;-)
>
>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.

>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...]
>
Thanks for your help!
YW

--
John
Pondering the value of the UIP: http://improve-usenet.org/
Jun 27 '08 #5
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
Jun 27 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tony Benham | last post by:
I'm having problems with a css layout where a margin is being inserted with the wrong width. I believe it's my css that's at fault since it is wrong in netscape 7.1, opera,7.11 and IE6 but I cannot...
3
by: Brian | last post by:
I have a page with content, navigation, and footer divs, in that order. The nav div has position: absolute, width 8em, on green background. The other divs have an 8em green left border, such that...
19
by: Thomas Mlynarczyk | last post by:
Hello, The following gives different results in IE and "Non-IE" browsers: <div style="background-color: green; width: 200px"> <div style="margin-top: 20px; background-color: red"> Hello...
3
by: Blacksmith | last post by:
Hi, I'm a CSS noob, and I'm trying to implement a very basic layout but am having problems in certain browsers. Basically, I want a horizontally centred box with a fixed width of 750px, with a...
13
by: Cool Guy | last post by:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>test</title> </head> <body> <div style="height: 100px; width: 100px;...
3
by: xen | last post by:
Hey there, In my html file I use a <div class="quote">. In my css file I define .quote I need to specify the margins for <pinside the <div> Today I learned that I can do this using ..quote p...
3
by: =?ISO-8859-1?Q?Ney_Andr=E9_de_Mello_Zunino?= | last post by:
Hello. I seek confirmation for the reasons behind a margin-related behavior I have observed. I have set up a simple test page to illustrate the issue. The page shows a very simple 2-column...
2
by: Steve Richter | last post by:
I want my panel to have an inner margin. Problem is label text does not appear to recognize the margin. In this example, the TextBox aligns on the margin, the label does not: <asp:Panel...
0
by: GTalbot | last post by:
Hello fellow stylesheet colleagues, Load this url: http://www.gtalbot.org/BrowserBugsSection/DefaultTopBottomMarginsForPargDisappear.html I would appreciate it if someone could explain 1-...
2
by: GTalbot | last post by:
www.authoring.html] Hello fellow HTML and markup coder colleagues, Please visit this url: http://www.gtalbot.org/BrowserBugsSection/DefaultTopBottomMarginsForPargDisappear.html I would...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.