Results 1 to 4 of 4
Thread: How to fix menu width in IE?
May 16, 2011, 05:30 #1
How to fix menu width in IE?
I have developed a menu to my site..
But it is working properly in Mozilla, but not in IE.
That means the width is increased and one menu category is showing in next line...
How can i make it to fit into the size as in Mozilla...
Thanking for your reply..
May 16, 2011, 06:32 #2
- Join Date
- Mar 2009
- Melbourne, AU
- 460 Post(s)
- 8 Thread(s)
You may just have to reduce margins a little, or padding, or widths etc. Do you have a link that we can look at, or a code sample? Then we can see what is going on. Otherwise, we can only make guesses.
May 16, 2011, 23:33 #3
Thanking you for your reply..
Test this site in IE and Mozilla. you will get the difference.
And when i login into the site, on the top fixed slide bar will shown.
At that time, sub-level menu is overlapping with the top level menu when i mouse over on the menu..(not showing properly).
May 17, 2011, 02:00 #4
- Join Date
- Jan 2003
- Hampshire UK
- 182 Post(s)
- 6 Thread(s)
You can't just expect a menu to reach full width because you have tweaked some padding t make it fir in one browser. Text width varies considerably between browsers by as much as 50px on a single line so you cannot just assume that if it first in one browers it will fit in another.
If you have to have a menu an exact width then you will need to class the individual menu items and give them a pixel width that matches exactly to the space available. You can center the text with text-align:center and no side padding will be needed. This means that wider text will be accommodated because it can expand without causing problem as there is some leeway in the width of each item unlike when the whole width is made of content and padding.
Alternatively for good browsers (ie8+) use display:table-cell as mentioned in my last post in this thread.