HighDots Forums  

help: margin-left not getting applied...

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss help: margin-left not getting applied... in the Cascading Style Sheets forum.



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

Default help: margin-left not getting applied... - 04-23-2008 , 11:52 AM






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?

Reply With Quote
  #2  
Old   
hzgt9b
 
Posts: n/a

Default Re: help: margin-left not getting applied... - 04-24-2008 , 09:51 AM






On Apr 23, 12:52*pm, hzgt9b <celof... (AT) gmail (DOT) com> wrote:
Quote:
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?


Reply With Quote
  #3  
Old   
David Stone
 
Posts: n/a

Default Re: help: margin-left not getting applied... - 04-24-2008 , 09:57 AM



In article
<a7661506-9772-40c3-a62a-89d8277975ad (AT) e39g2000hsf (DOT) googlegroups.com>,
hzgt9b <celoftis (AT) gmail (DOT) com> wrote:

Quote:
On Apr 23, 12:52*pm, hzgt9b <celof... (AT) gmail (DOT) com> wrote:
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?


Reply With Quote
  #4  
Old   
hzgt9b
 
Posts: n/a

Default Re: help: margin-left not getting applied... - 04-24-2008 , 12:49 PM



On Apr 24, 10:57*am, David Stone <no.em... (AT) domain (DOT) invalid> wrote:
Quote:
In article
a7661506-9772-40c3-a62a-89d827797... (AT) e39g2000hsf (DOT) googlegroups.com>,





*hzgt9b <celof... (AT) gmail (DOT) com> wrote:
On Apr 23, 12:52*pm, hzgt9b <celof... (AT) gmail (DOT) com> wrote:
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


Reply With Quote
  #5  
Old   
Bergamot
 
Posts: n/a

Default Re: help: margin-left not getting applied... - 04-24-2008 , 02:05 PM




hzgt9b wrote:
Quote:
On Apr 23, 12:52 pm, hzgt9b <celof... (AT) gmail (DOT) com> wrote:

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


Reply With Quote
  #6  
Old   
hzgt9b
 
Posts: n/a

Default Re: help: margin-left not getting applied... - 04-24-2008 , 02:31 PM



On Apr 24, 3:05*pm, Bergamot <berga... (AT) visi (DOT) com> wrote:
Quote:
hzgt9b wrote:
On Apr 23, 12:52 pm, hzgt9b <celof... (AT) gmail (DOT) com> wrote:

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.


Reply With Quote
  #7  
Old   
hzgt9b
 
Posts: n/a

Default Re: help: margin-left not getting applied... - 04-27-2008 , 06:54 PM



On Apr 24, 3:31*pm, hzgt9b <celof... (AT) gmail (DOT) com> wrote:
Quote:
On Apr 24, 3:05*pm, Bergamot <berga... (AT) visi (DOT) com> wrote:





hzgt9b wrote:
On Apr 23, 12:52 pm, hzgt9b <celof... (AT) gmail (DOT) com> wrote:

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?


Reply With Quote
  #8  
Old   
Gus Richter
 
Posts: n/a

Default Re: help: margin-left not getting applied... - 04-27-2008 , 08:39 PM



hzgt9b wrote:
Quote:
On Apr 24, 3:31 pm, hzgt9b <celof... (AT) gmail (DOT) com> wrote:
On Apr 24, 3:05 pm, Bergamot <berga... (AT) visi (DOT) com> wrote:

hzgt9b wrote:
On Apr 23, 12:52 pm, hzgt9b <celof... (AT) gmail (DOT) com> wrote:
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


Reply With Quote
  #9  
Old   
hzgt9b
 
Posts: n/a

Default Re: help: margin-left not getting applied... - 04-28-2008 , 11:37 AM



On Apr 27, 9:39*pm, Gus Richter <gusrich... (AT) netscape (DOT) net> wrote:
Quote:
hzgt9b wrote:
On Apr 24, 3:31 pm, hzgt9b <celof... (AT) gmail (DOT) com> wrote:
On Apr 24, 3:05 pm, Bergamot <berga... (AT) visi (DOT) com> wrote:

hzgt9b wrote:
On Apr 23, 12:52 pm, hzgt9b <celof... (AT) gmail (DOT) com> wrote:
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


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.