![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
|
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 |
#3
| ||||
| ||||
|
|
URL? (Please don't paste a bunch of incomplete code.) Sorry but I don't have a freely accessible web server at my |
|
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, |
| 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... (AT) e39g2000hsf (DOT) googlegroups.com> or simply adopt the <number> variant 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. |
#4
| |||
| |||
|
|
URL? (Please don't paste a bunch of incomplete code.) Sorry but I don't have a freely accessible web server at my disposal |
#5
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |