473,385 Members | 1,673 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,385 software developers and data experts.

IE and Firefox not displaying the same...

Hi -

Some background info:

I'm helping to redesign an internal website at work, and I've decided to use CSS, though I don't really have any experience with it. I figure now's a good time to learn...and what I know right now, I've pretty much learned in the last week or two.

At work, we have access to only two browsers, IE 6.0 and Firefox 2.0, so these are the only two browsers I can test the site in, and they're the only ones that have to work with it.

I am currently experiencing an issue where there's more whitespace in IE than in Firefox. The way it looks in Firefox is the way I want it to look in IE (though, I think I might want to add a little bit more whitespace, but nowhere near as much as in IE). Is there any way I can get them to look the same? Will I have to write two separate css files, one for each browser? I've tried looking at other posts about whitespace issues, but none of them have seemed to address my issue (or fix it).

Since the website is on our intranet, I can't link it, but here's most of the code is pasted below. Since you won't have the images, it will probably be kind of funky, especially since I was trying (and seemed to have succeeded based on what I can see in my browsers) to incorporate CSS tab rollovers as described at http://www.simplebits.com/notebook/2...rollovers.html



HTML:

[HTML]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Title</title>
<link href="css/style4.css" rel="stylesheet" type="text/css" />
</head>

<body>

<div id="wrap">
<div id="header1L" class="header"><img src="images/logo.jpg" alt="logo" /></div>
<div id="header1R" class="header" align="right">Title</div>

<div id="navtabs">
<ul id="nav">
<li id="tabout"><a href="/" class="selected">About Us</a></li>
<li id="tnews"><a href="/news/">News</a></li>
<li id="tpeople"><a href="/people/">People</a></li>
<li id="tprocesses"><a href="/processes/">Processes</a></li>
<li id="tproducts"><a href="/products/">Products</a></li>
<li id="tperformance"><a href="/performance/">Performance</a></li>
<li id="ttools"><a href="/toolslinks/">Tools + Links</a></li>
<li id="tsitemap"><a href="/sitemap/">Site Map</a></li>
</ul>
</div>

<div id="content-wrap">
<div id="content"> CONTENT
</div>
</div>

<div id="footer"> FOOTER
</div>

</div>

</body>
</html>
[/HTML]

CSS:

/* CSS Document */
Expand|Select|Wrap|Line Numbers
  1.  
  2. html,
  3. body {
  4.     margin:0;
  5.     padding:0;
  6.     height:100%;
  7. }
  8.  
  9. #header1L {
  10.     width:355px;
  11.     height:75px;
  12.     float:left;
  13.     padding-top:15px;
  14. }
  15. #header1R {
  16.     width:355px;
  17.     height:75px;
  18.     float:right;
  19.     padding-top:18px;
  20. }
  21.  
  22. #navtabs {
  23.     position:fixed;
  24.     top: 0;
  25.     width:710px;
  26.     height:100px;
  27.     padding-top:75px;
  28.     padding-left: 0;
  29.     padding-bottom:0px;
  30.     padding-right:0;
  31.     z-index:10; 
  32. }
  33.  
  34. html>body #wrap {height:100%;}
  35. #wrap {
  36.     width:710px;
  37.     margin:0 auto;
  38. }
  39.  
  40. html>body #content-wrap {height:100%;} 
  41. html>body #content {
  42.     padding:110px 10px; 
  43.     height:100%;
  44. } /* 110px = height of #header1 +#header2 and #footer + 10px, 10px = give the content some breathing space */
  45.  
  46. #footer {
  47.     width:710px;
  48.     height:75px;
  49. }
  50. html>body #footer {
  51.     position:fixed;
  52.     bottom:0;
  53.     z-index:10; 
  54. }
  55.  
  56. #nav {
  57.     margin: 0;
  58.     padding: 0;
  59.     height: 25px;
  60.     list-style: none;
  61.     display: inline;
  62.     overflow: hidden;
  63. }
  64.  
  65. #nav li {
  66.     margin: 0; 
  67.     padding: 0;
  68.         list-style: none;
  69.     display: inline;
  70.     }
  71.  
  72. #nav a {
  73.     float: left;
  74.     padding: 25px 0 0 0;
  75.     overflow: hidden;
  76.     height: 0px !important; 
  77.     height /**/:25px; /* for IE5/Win only */
  78.     }
  79.  
  80. #nav a:hover {
  81.     background-position: 0 -25px;
  82.     }
  83.  
  84. #nav a:active, #nav a.selected {
  85.     background-position: 0 -50px;
  86.     }
  87.  
  88. #tabout a  {
  89.     width: 85px;
  90.     background:url(../images/navimg/btnAboutUs.jpg) top left no-repeat;
  91. }
  92.  
  93. #tnews a  {
  94.     width: 60px;
  95.     background: url(../images/navimg/btnNews.jpg) top left no-repeat;
  96. }
  97.  
  98. #tpeople a {
  99.     width: 75px;
  100.     background: url(../images/navimg/btnPeople.jpg) top left no-repeat;
  101. }
  102.  
  103. #tprocesses a {
  104.     width: 95px;
  105.     background: url(../images/navimg/btnProcesses.jpg) top left no-repeat;
  106. }
  107.  
  108. #tproducts a {
  109.     width: 85px;
  110.     background: url(../images/navimg/btnProducts.jpg) top left no-repeat;
  111. }
  112.  
  113. #tperformance a {
  114.     width: 105px;
  115.     background: url(../images/navimg/btnPerformance.jpg) top left no-repeat;
  116. }
  117.  
  118. #ttools a {
  119.     width: 120px;
  120.     background: url(../images/navimg/btnTools.jpg) top left no-repeat;
  121. }
  122.  
  123. #tsitemap a {
  124.     width: 85px;
  125.     background: url(../images/navimg/btnSiteMap.jpg) top left no-repeat;
  126. }
  127.  
I've kind of piece-mealed my code together from suggestions I've found on different websites, so I apologize if the code is totally a mess. If anyone has any suggestions to help me out, I'd really appreciate it.

Thanks!
Aug 10 '07 #1
2 2623
IE rendering strikes again.
Aug 12 '07 #2
bettor
27
I can't really understand where the space is showing but be careful with padding. I see stated padding in almost every division. I hope you understand what the padding option does and how it reflects the content in the given division. other than that try to use some position:absolute but not too much. You can always use conditional comments for IE. Here is an example:
[HTML]<!--[if IE 6]>
<link href="file.css" media="screen" rel="stylesheet" type="text/css" />
<![endif]--> [/HTML]
make sure to put the comments after the main css file or right before the </head> tag. this should contain the code for IE 6 only.

Hopefully that helps. if you give us some more info on where you see the white space we might be able to help you more.
Aug 12 '07 #3

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

Similar topics

7
by: Jim Flack | last post by:
I'm currently trying to set up a webpage where 'visitors' can select their own size text (over-ride my preferred settings so to speak). I used to use a fixed font size (11px) but have now tried to...
5
by: uberderf | last post by:
I have the following web page setup: http://angels.uberderf.com/glossary.html I have a 2 column table layout which is a glossary of terms and their meanings. When you view this page in firefox...
3
by: David Hayes | last post by:
I've made tooltips work in Firefox*, but tooltip doesn't appear at the specified location until the SECOND time that the user passes the mouse over the location with the mouseover event. What I...
4
by: simon.a.hulbert | last post by:
Hi, I'm trying to view the following xslt transformation using firefox <xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" > <xsl:output method = "xml" indent =...
9
by: =?Utf-8?B?Sm9obiBCYWlsZXk=?= | last post by:
I have a ASP .Net page that allows moving around items on the page through javascript. This page works fine in IE. In FireFox however, I have found that if the page is using XHTML 1.0...
33
by: buss123 | last post by:
Hi all, combo box script code was working in IE perfectly with all modes but OnChange event was not working in FireFox(editable mode, if we select valuese that combo box values r...
4
by: adamwolf1965 | last post by:
On the page http://www.franklincar.org/index.html (which I did not build), some Firefox users are reporting that the "Franklin Vintage Photo Book" image towards the middle of the page (right below...
1
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being...
4
by: PianoMan64 | last post by:
Hey Experts, I'm not sure how to get around this, and any help would be most greatfull. I have an issue with having a CSS menu that displays correctly in IE and not correctly in Firefox 3.0.3,...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: 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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.