473,386 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

help: margin-left not getting applied...

I am working on a site that is being served to a private network. All
the users are using IE6+.

I am having trouble getting the 1st div added to a containing div to
have its margin-left applied - right now it appears that it is getting
ignored. It only seems to be a problem with the 1st div added to the
containing div. If I add any other element before this first div (even
a comment) then the margin-left gets applied to the offending div.

QUESTIONS:
Does anyone know why the margin-left is not getting applied? If so,
any suggestions on how to fix it?

Here's a page showing the problem:
http://www.freewebtown.com/emailcelo...eftMargin.html

Thoughts?
Jun 27 '08 #1
8 2220
On Apr 23, 12:52*pm, hzgt9b <celof...@gmail.comwrote:
I am working on a site that is being served to a private network. All
the users are using IE6+.

I am having trouble getting the 1st div added to a containing div to
have its margin-left applied - right now it appears that it is getting
ignored. It only seems to be a problem with the 1st div added to the
containing div. If I add any other element before this first div (even
a comment) then the margin-left gets applied to the offending div.

QUESTIONS:
Does anyone know why the margin-left is not getting applied? If so,
any suggestions on how to fix it?

Here's a page showing the problem:http://www.freewebtown.com/emailcelo...eftMargin.html

Thoughts?
Anyone?
Jun 27 '08 #2
In article
<a7**********************************@e39g2000hsf. googlegroups.com>,
hzgt9b <ce******@gmail.comwrote:
On Apr 23, 12:52*pm, hzgt9b <celof...@gmail.comwrote:
I am working on a site that is being served to a private network. All
the users are using IE6+.

I am having trouble getting the 1st div added to a containing div to
have its margin-left applied - right now it appears that it is getting
ignored. It only seems to be a problem with the 1st div added to the
containing div. If I add any other element before this first div (even
a comment) then the margin-left gets applied to the offending div.

QUESTIONS:
Does anyone know why the margin-left is not getting applied? If so,
any suggestions on how to fix it?

Here's a page showing the
problem:http://www.freewebtown.com/emailcelo...eftMargin.html

Thoughts?

Anyone?
I tried looking at your page earlier, but it didn't actually
seem to exist at the url you provided then.

Looking at it now in both Safari and Firefox (Mac), I see the
same left margin on both divs that you claim appear different.

What browser(s) are you seeing the problem in?
Jun 27 '08 #3
On Apr 24, 10:57*am, David Stone <no.em...@domain.invalidwrote:
In article
<a7661506-9772-40c3-a62a-89d827797...@e39g2000hsf.googlegroups.com>,

*hzgt9b <celof...@gmail.comwrote:
On Apr 23, 12:52*pm, hzgt9b <celof...@gmail.comwrote:
I am working on a site that is being served to a private network. All
the users are using IE6+.
I am having trouble getting the 1st div added to a containing div to
have its margin-left applied - right now it appears that it is getting
ignored. It only seems to be a problem with the 1st div added to the
containing div. If I add any other element before this first div (even
a comment) then the margin-left gets applied to the offending div.
QUESTIONS:
Does anyone know why the margin-left is not getting applied? If so,
any suggestions on how to fix it?
Here's a page showing the
problem:http://www.freewebtown.com/emailcelo...eftMargin.html
Thoughts?
Anyone?

I tried looking at your page earlier, but it didn't actually
seem to exist at the url you provided then.

Looking at it now in both Safari and Firefox (Mac), I see the
same left margin on both divs that you claim appear different.

What browser(s) are you seeing the problem in?- Hide quoted text -

- Show quoted text -
IE6, IE7
Jun 27 '08 #4

hzgt9b wrote:
On Apr 23, 12:52 pm, hzgt9b <celof...@gmail.comwrote:
>>
I am having trouble getting the 1st div added to a containing div to
have its margin-left applied

http://www.freewebtown.com/emailcelo...eftMargin.html
What's with all the convoluted containers? This is way more complicated
than it needs to be, plus it's a most serious case of "div-itis".
http://microformats.org/wiki/posh

I bet if you simplified it, the problem would disappear on its own.

BTW, this:
#contents {
position:relative;
top:2em;
}

probably doesn't do what you think it does.
http://brainjar.com/css/positioning/

--
Berg
Jun 27 '08 #5
On Apr 24, 3:05*pm, Bergamot <berga...@visi.comwrote:
hzgt9b wrote:
On Apr 23, 12:52 pm, hzgt9b <celof...@gmail.comwrote:
I am having trouble getting the 1st div added to a containing div to
have its margin-left applied
>http://www.freewebtown.com/emailcelo...eftMargin.html

What's with all the convoluted containers? This is way more complicated
than it needs to be, plus it's a most serious case of "div-itis".http://microformats.org/wiki/posh

I bet if you simplified it, the problem would disappear on its own.

BTW, this:
#contents {
* * position:relative;
* * top:2em;

}

probably doesn't do what you think it does.http://brainjar.com/css/positioning/

--
Berg
>What's with all the convoluted containers?
The example page is the most simplified form of the actual problem
that I could create to display the problem and to includ all the CSS
markup that acts on the offending element and/or its ancestors in the
page hierarchy (the other containers serve to hold other content in
the full version of the page).

The #contents div is styled as intended.
Jun 27 '08 #6
On Apr 24, 3:31*pm, hzgt9b <celof...@gmail.comwrote:
On Apr 24, 3:05*pm, Bergamot <berga...@visi.comwrote:


hzgt9b wrote:
On Apr 23, 12:52 pm, hzgt9b <celof...@gmail.comwrote:
>I am having trouble getting the 1st div added to a containing div to
>have its margin-left applied
>>http://www.freewebtown.com/emailcelo...eftMargin.html
What's with all the convoluted containers? This is way more complicated
than it needs to be, plus it's a most serious case of "div-itis".http://microformats.org/wiki/posh
I bet if you simplified it, the problem would disappear on its own.
BTW, this:
#contents {
* * position:relative;
* * top:2em;
}
probably doesn't do what you think it does.http://brainjar.com/css/positioning/
--
Berg
What's with all the convoluted containers?

The example page is the most simplified form of the actual problem
that I could create to display the problem and to includ all the CSS
markup that acts on the offending element and/or its ancestors in the
page hierarchy (the other containers serve to hold other content in
the full version of the page).

The #contents div is styled as intended.- Hide quoted text -

- Show quoted text -
Any other suggestions?
Jun 27 '08 #7
hzgt9b wrote:
On Apr 24, 3:31 pm, hzgt9b <celof...@gmail.comwrote:
>On Apr 24, 3:05 pm, Bergamot <berga...@visi.comwrote:
>>hzgt9b wrote:
On Apr 23, 12:52 pm, hzgt9b <celof...@gmail.comwrote:
I am having trouble getting the 1st div added to a containing div to
have its margin-left applied
http://www.freewebtown.com/emailcelo...eftMargin.html
What's with all the convoluted containers? This is way more complicated
than it needs to be, plus it's a most serious case of "div-itis".http://microformats.org/wiki/posh
I bet if you simplified it, the problem would disappear on its own.
BTW, this:
#contents {
position:relative;
top:2em;
}
probably doesn't do what you think it does.http://brainjar.com/css/positioning/
--
Berg
What's with all the convoluted containers?
The example page is the most simplified form of the actual problem
that I could create to display the problem and to includ all the CSS
markup that acts on the offending element and/or its ancestors in the
page hierarchy (the other containers serve to hold other content in
the full version of the page).

The #contents div is styled as intended.- Hide quoted text -

- Show quoted text -

Any other suggestions?
Why IE barfs is probably tied in with its box model problem.
In any case, there is one good rule to go by:

Use margin to position the container.
Use padding to position the content.

Change:
<div style="margin-left: 30px; .....
To:
<div style="padding-left: 30px; .....

--
Gus
Jun 27 '08 #8
On Apr 27, 9:39*pm, Gus Richter <gusrich...@netscape.netwrote:
hzgt9b wrote:
On Apr 24, 3:31 pm, hzgt9b <celof...@gmail.comwrote:
On Apr 24, 3:05 pm, Bergamot <berga...@visi.comwrote:
>hzgt9b wrote:
On Apr 23, 12:52 pm, hzgt9b <celof...@gmail.comwrote:
I am having trouble getting the 1st div added to a containing div to
have its margin-left applied
http://www.freewebtown.com/emailcelo...eftMargin.html
What's with all the convoluted containers? This is way more complicated
than it needs to be, plus it's a most serious case of "div-itis".http://microformats.org/wiki/posh
I bet if you simplified it, the problem would disappear on its own.
BTW, this:
#contents {
* * position:relative;
* * top:2em;
}
probably doesn't do what you think it does.http://brainjar.com/css/positioning/
--
Berg
What's with all the convoluted containers?
The example page is the most simplified form of the actual problem
that I could create to display the problem and to includ all the CSS
markup that acts on the offending element and/or its ancestors in the
page hierarchy (the other containers serve to hold other content in
the full version of the page).
The #contents div is styled as intended.- Hide quoted text -
- Show quoted text -
Any other suggestions?

Why IE barfs is probably tied in with its box model problem.
In any case, there is one good rule to go by:

Use margin to position the container.
Use padding to position the content.

Change:
* * <div style="margin-left: 30px; .....
To:
* * <div style="padding-left: 30px; .....

--
Gus- Hide quoted text -

- Show quoted text -
Thanks for the tip
Jun 27 '08 #9

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

Similar topics

2
by: fabien | last post by:
Hi, I am writing a POV-RAY editor with Python using either QT or GTK as GUI 'wrapper'. ( I am still trying both ) * * * * PYGTK * * * * I have downloaded PygtkScintilla-1.99.5. There is a...
38
by: Kai Jaeger | last post by:
I am playing with setting font sizes in CSS using em as unit of measurement. All seems to be fine. Even Netscape Navigator shows the characters very similar to IE, what is not the kind if px is...
2
by: MM | last post by:
I am using the following code to display an image in a seperate window. <form> <input type=button onClick='window.open("image1.jpg","","width=260,height=260,resizable=0,border=0")' value=Shhow...
3
by: gscott66 | last post by:
Hello, I am fairly new to design and in particular CSS. I have a site with two tables that I cannot seem to get sized correctly. When you view the link, you'll notice that there is a tremendous...
6
by: Alan Silver | last post by:
Hello, I'm just taking my first steps at doing layout with CSS, and I'm having a few problems. This could be because I don't really understand what I'm doing yet!! I would really appreciate any...
12
by: Koelner | last post by:
Hello all, am very frustrated because I can't get a simple table to display the same way in both browsers. It displays the way I want it to in Firefox but not in IE7 (Windows XP). 1) not sure if...
3
by: bettor | last post by:
Ok guys, I really hope to find some help here. I am designing a website for a friend. I made a vertical menu with Dreamweaver CS3 but the sub menus that slide out of the root menu appear to be off...
1
crystal2005
by: crystal2005 | last post by:
Hi i encounterd some problem when i implement CSS for rounded Corner table. Need help please... :D <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />...
1
by: cbradio | last post by:
thescripts gurus, I would like to know if I could get some help with making elements of my layout expand (liquid) to the size of their containers, but also allow for some predefined, static...
4
by: charmeda103 | last post by:
i have this program that i am almost done with, i am one part away from being done. the last part is putting the results together; here is the results that i need to put in code. do u have any...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.