Hi Bill,

The body width is not specified. It is by default 100% of the viewport
minus some
margin pixels, depending on browser. So on my 1280px wide screen, in Firefox 3,
the width of the body was 1264px as by default the body element has margin: 8px;
according to Firebug. In IE6 this default is margin: 15px 10px; according to IE
Developer Toolbar. Basically there's no need to give it a certain
width unless you
want a fixed size layout.

In your case the problem resides in that those DIVs, that I mentioned
about in my
previous email, act just like the body element, or any other block
element. They try
to span 100% of the viewport by default. By positioning them
relatively with a large
left offset you're pushing them to the right without changing their
default width, thus
the scrollbar.

Here's a little screenshot that shows exactly how one of those DIVs is
pushed to the right:

http://amenthes.110mb.com/css-d.png

Regarding the float. You should make it a try on your design to see
how it works.
At first it may blow it up completely but it is fundamental to
understand floating in CSS.
In order to float an element a float:left; or float:right; declaration
is all you need, no positioning
required. But, as I said, you'll also need a display:inline; for IE6
to behave as expected.

Hope that helps.


Cheers,
Ionut


On Tue, Nov 4, 2008 at 5:09 PM, Bill Walton <[EMAIL PROTECTED]> wrote:
> Hi Ionut,
>
> Ionut Gabriel Stan wrote:
>> Bill Walton wrote:
>> >
>> > I can't figure out why I have a horizontal scroll bar at
> http://www.shopkeepers-r.us or how to get rid of it.  The current plan is
> for the browser window to be maximized with the screen resolution set at
> 1024x768.  I'd sure appreciate help.  Resource pointers that would help me
> understand why this is happening would _really_ be appreciated.
>>
>> It's because of these elements:
>>
>>      #customer_search_form,
>>      #walkin_customer_button,
>>      #purchase_return_button
>>
>> ...and maybe others.
>>
>> The explanation is that you positioned them relatively
>> with a large left offset but forgot to change them
>> the width value which right now is 100% of the body
>> width -> 1264px in FF3.
>
> Thank you very much for this.  One big question... how / where is the body
> width specified?  I thought it might have to do with body width and went
> through all the CSS (I think) without finding it.  Maybe I'm looking for the
> wrong thing?
>>
>> My advice is to float them left instead of positioning
>> them relatively.
>
> I'll try this, but I thought that an element had to be positioned relative
> in _order_ to float it.  Wrong?
>
>> If you float them left, don't forget to
>> also add a display:inline; after the float: left; declaration.
>> It's for Internet Explorer's double margin floating bug[1].
>>
>> [1] http://www.positioniseverything.net/explorer/doubled-margin.html
>
> The best news is that this _only_ has to be styled for FF ;-)
>
> Thanks very much for your help.  I appreciate it!
>
> Best regards,
> Bill
>
>
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to