Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > another CSS positioning question....

Reply
Thread Tools

another CSS positioning question....

 
 
Leslie
Guest
Posts: n/a
 
      11-01-2003
re:
http://www.bessiebee.com/test/soc_st...HEET_TEST.HTML

This is a work in progress in my efforts to implement CSS. I know
there are things I need to eliminate, like the spacer.gif, but my
question, this time, is:

This page validates as both HTML 4.01 Transitional and CSS. However,
it displays differently in different browsers. I've checked it with
IE, Opera and Mozilla.

In both Opera and Mozilla the <div id="container2"> displays right
where I want it; at the top of the page and 5 px to the right of the
graphic. In IE, however, the gap between the graphic and div is much
wider AND I'm getting a horizontal scroll bar because the text doesn't
wrap.

Can someone please tell me what I'm doing wrong?

Thank you!!

Leslie
 
Reply With Quote
 
 
 
 
Eric Bohlman
Guest
Posts: n/a
 
      11-01-2003
Leslie <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> In both Opera and Mozilla the <div id="container2"> displays right
> where I want it; at the top of the page and 5 px to the right of the
> graphic. In IE, however, the gap between the graphic and div is much
> wider AND I'm getting a horizontal scroll bar because the text doesn't
> wrap.
>
> Can someone please tell me what I'm doing wrong?


Trying to specify the horizontal position of an absolutely positioned
element by using a margin rather than a position. Change "margin-top" to
simply "top."
 
Reply With Quote
 
 
 
 
Leslie
Guest
Posts: n/a
 
      11-02-2003
On 1 Nov 2003 22:56:14 GMT, Eric Bohlman <(E-Mail Removed)>
wrote:

>Leslie <(E-Mail Removed)> wrote in
>news:(E-Mail Removed) :
>
>> In both Opera and Mozilla the <div id="container2"> displays right
>> where I want it; at the top of the page and 5 px to the right of the
>> graphic. In IE, however, the gap between the graphic and div is much
>> wider AND I'm getting a horizontal scroll bar because the text doesn't
>> wrap.
>>
>> Can someone please tell me what I'm doing wrong?

>
>Trying to specify the horizontal position of an absolutely positioned
>element by using a margin rather than a position. Change "margin-top" to
>simply "top."


But, "margin-top" is used in "#container1" and I don't use that
anywhere on the web page. Having an unused style in the stylesheet
won't affect the web page, will it? And, would that explain why I've
got a horizontal scroll bar in IE but not Opera or Mozilla?

Leslie
 
Reply With Quote
 
Eric Bohlman
Guest
Posts: n/a
 
      11-02-2003
Leslie <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> On 1 Nov 2003 22:56:14 GMT, Eric Bohlman <(E-Mail Removed)>
> wrote:
>>Trying to specify the horizontal position of an absolutely positioned
>>element by using a margin rather than a position. Change "margin-top"
>>to simply "top."

>
> But, "margin-top" is used in "#container1" and I don't use that
> anywhere on the web page. Having an unused style in the stylesheet
> won't affect the web page, will it? And, would that explain why I've
> got a horizontal scroll bar in IE but not Opera or Mozilla?


My fault. I meant to write "margin-left" and "left."

If you specify only one dimension when doing positioning, the other one
defaults to "auto" which gives the browser some discretion in layout, and
different browsers will come up with different results.
 
Reply With Quote
 
Leslie
Guest
Posts: n/a
 
      11-02-2003
On 2 Nov 2003 02:12:51 GMT, Eric Bohlman <(E-Mail Removed)>
wrote:

>Leslie <(E-Mail Removed)> wrote in
>news:(E-Mail Removed) :
>
>> On 1 Nov 2003 22:56:14 GMT, Eric Bohlman <(E-Mail Removed)>
>> wrote:
>>>Trying to specify the horizontal position of an absolutely positioned
>>>element by using a margin rather than a position. Change "margin-top"
>>>to simply "top."

>>
>> But, "margin-top" is used in "#container1" and I don't use that
>> anywhere on the web page. Having an unused style in the stylesheet
>> won't affect the web page, will it? And, would that explain why I've
>> got a horizontal scroll bar in IE but not Opera or Mozilla?

>
>My fault. I meant to write "margin-left" and "left."
>
>If you specify only one dimension when doing positioning, the other one
>defaults to "auto" which gives the browser some discretion in layout, and
>different browsers will come up with different results.


That did it! Thank you very much!!

Leslie
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Datalist and CSS positioning Eric ASP .Net 1 09-14-2005 03:38 PM
OT ...CSS positioning ASP .Net 1 04-07-2004 12:58 PM
Re: CSS positioning help - Mozilla brucie HTML 8 06-29-2003 05:39 PM
Re: CSS positioning help - Mozilla David Graham HTML 1 06-28-2003 05:15 PM
Re: css positioning vs. tables PeterMcC HTML 0 06-23-2003 04:45 PM



Advertisments