100% not 100%?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Cliff
Beginner
Beginner
Posts: 4
Joined: Tue Jun 28, 2005 11:34 pm

100% not 100%?

Post by Cliff »

I am setting up a new menu using the Office 2003 sample.
I have set it to 100%.
In IE it is about 10px from the right, not a full 100%, in FireFox it is giving me a tiny horizontal scroll bar.

Any tips?

Here is the test page I am trying.
http://www.bloodbanktalk.com/untitled.cfm
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

It has something to do with the 'automatic' margins that all the browsers put on pages. What I do to make sure all browsers are the same is put a css style section in the head with margins set to 0.

Code: Select all

<style type="text/css">body{margin:0px}</style>
That should make it the same in all browsers. You can of course set it to whatever you want, margin-top:10px; margin-right:0px; and so on mix and match or make them the same.

Ruth
Cliff
Beginner
Beginner
Posts: 4
Joined: Tue Jun 28, 2005 11:34 pm

Post by Cliff »

It worked great in IE, but FF is still giving me a scroll bar.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

It has something to do with the border. For some reason the Mozilla browsers are making the menu 100% excluding the right and left border and then adding the right and left border at 1px so that causes the scrollbar at the bottom. I have tried a number of things for a fix but the only way I could do it was to code the menu like this

Code: Select all

menuwidth="99.7%";
screenposition="center";
The screenposition="center"; is necessary since the menu is now less that 100%. But, the 99.7% eliminated the scroll bar in Mozilla and because it's almost 100%, you only see a teeny tiny smidgeen of white at the right and left in IE. Sorry, that's all I could figure to make it work without a scrollbar in Mozilla.


Ruth
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Try this pre-release. Let us know what happens.
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Didn't think to try that. But, with your gentle reminder..... :) However, the same problem occurs.

:oops: I also forgot to to say that in Mozilla it seems to calculate 100% for the menu and then add the border and margin to that. So, Cliff will also have to remove the margin=2 from his Main Menu.

Ruth
Post Reply