473,382 Members | 1,329 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Table width looks different in IE and Firefox

I am designing a table-based menu. I want the table to take up the entire screen, as it is separating my banner image and the beginning of the text. Anyways, as you can see, I used the "width:100%" attribute. But in Firefox, this shows the table pushed right 0.5em, so I added a "margin-left:-0.5em" attribute, which makes it look great in Firefox; in IE, however, it shows the table ending 0.5em left of the right side of the window, and the table being a few pixels shorter on the left side. How can I make the menu look the same in both IE and Firefox? Thanks!


Here is the code:

<table cellpadding=5 style="white-space: nowrap; width:100%; height:2em; position:absolute; top:8em; background-color: red; color: white; font: 15pt arial;font-color:white; font-weight: bold; margin-left:-0.5em">
<tr>
<td style="white-space: nowrap;"><a href="index.html">Home</a></td>
<td style="white-space: nowrap;"><a href="aboutus.html">About Us</a></td>
<td style="white-space: nowrap;"><a href="routesandfleet.html">Routes & Fleet</a></td>
<td style="white-space: nowrap;"><a href="pilotresourcecenter.html">Pilot resource center</a></td>
<td style="white-space: nowrap;"><a href="becomeapilot.html">Become a pilot</a></td>
<td width=40%><!--Blank td added to condense menu items-->
</tr>
</table>
Jun 20 '07 #1
1 5856
drhowarddrfine
7,435 Expert 4TB
In modern browsers, html and body can be styled seperately, but not IE. So, add this to your css:
*{margin:0}
Jun 20 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Robert | last post by:
Hi, I am trying to add a background to a cell that contains multiple horizontal coloured layers on top of eachother. I managed to do this in IE, but firefox displays something very different...
4
by: Alex Meier | last post by:
I have the following problem: I need a simple, tabular layout in a webshop. - left column: navigation column with approx. 170px width - right column: content area the goal: the left column...
11
by: Norman L. DeForest | last post by:
Am I misunderstanding the CSS specifications or is Firefox (version 1.0.6) (and Opera) doing the wrong thing? It appears that Firefox 1.0.6 includes the border in width calculations for tables...
13
by: Giggle Girl | last post by:
Hi there, I am having a problem with the behavior of Firefox, where lefthand column content is not resized properly after it is "collapsed" and then "re-expanded". An online demo is available...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
1
by: Stephen Takacs | last post by:
I've been reading lots of rounded corners table tutorials lately, because I'm a Perl guru, not an HTML guru. :-) So far all of the examples I've seen have edges with narrow angles, which fit...
7
by: aljamala | last post by:
Hi All, I am encountering this problem while doing some cross-browser testing. The table in IE looks fine, in Firefox it goes all the way to the edge of the screen and in Opera it is going off...
3
by: McKirahan | last post by:
I have a Web page that uses some JavaScript and CSS. I have specified a three column table with a fixed-width left and right side; the center colum expands to fill the page. Within this...
22
Atli
by: Atli | last post by:
Hi. I'm setting up a small photo-album-type thing, where I use PHP to set up a list of images for visitors to click through. That's all simple enough. However, I'm having a weird bug in IE8. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.