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

CSS Problem in IE 7, but not FireFox

Hey everyone,

I seem to be having a problem with my CSS in IE 7. The problem does not show up in FireFox though.

I've setup an online store that originally had a #wrapper "container" and #body CSS tags with widths of 1000 pixels. I know that their are many internet users that still have low resolutions such as 800 pixels. So I set out to change the width of the storefront to around 780 pixels.

I've changed the width for the #wrapper and #body tags in the CSS, but for some reason the width will not change in IE 7. IE 7 still looks as though it is keeping the original 1000 pixel width. Please take a look: THE WEBSITE .

There are three columns in a table within the #wrapper and #body of the index page. I have found if I change the middle column to the smallest width possible, the column and content will decrease in size, but the overall page will still keep the 1000 pixel width. On the other hand, if I take out the middle column, all together, THEN (and only THEN) IE 7 will decrease the width to the 780 pixels.

I have also tried clearing out the cache in both of my browsers to make sure that it wasn't re-using past browser info, but it has no effect.

Any and all help will be extremely appreciated.

THIS IS THE RELEVANT CSS FOR THE PAGE I AM WORKING ON:

Expand|Select|Wrap|Line Numbers
  1. body {
  2.  
  3.     font-size: 90%;
  4.     color: #161a20;
  5.     width: 780px; /*set the site width - not below 750*/
  6.     text-align: center; /* For IE*/
  7.     margin: 0 auto; /*For Mozilla & Opera*/
  8. }
  9.  
  10. .wrapper {
  11.     width: 780px;
  12.     }
  13.  
  14. .header {
  15.     background-image:url(img/header_middle.gif);
  16.     background-repeat:repeat-x;
  17.     color:white;
  18.     height:76px;    
  19.     width:780px;
  20.     overflow:hidden;
  21.     }
  22.  
  23. .subTitleBar {
  24.     background-color:white;
  25.     }
  26.  
  27. #search_bar {
  28.     margin-top:2px;
  29.     background-color:#FFF;
  30.     height:26px;
  31.     text-align:center;
  32.     margin-bottom:10px;
  33.     }
  34.  
  35. #search_bar_right {
  36.     float:none;
  37.     text-align:right;
  38.     background-image:url(img/search_bar_right.gif);
  39.     background-position:center;
  40.     background-repeat:no-repeat;
  41.     width:100%;
  42.     overflow:hidden;
  43.     height:26px;
  44.     }
  45.  
  46. .center_column {
  47.     padding-left:15px;
  48.     padding-right:15px;
  49.     }
  50.  
  51. .center_column * {
  52.     font-size:14px; 
  53.     }
AND HERE IS CODE FOR THE PAGE CALLING THE CSS:

[HTML]<body>
<table class="wrapper" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td height="1%" colspan="3" >
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="header">

<tr>
<td colspan="3" width="100%" class="subTitleBar">
<div id="search_bar" align="center">
<div id="search_bar_right">
<?php
includes_start("modules/search/search_nug.php");
require(basename("modules/search/search_nug.php"));
includes_end();
?>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>

<td width="1%" height="98%" valign="top">
<?php
includes_start("modules/category/cat_nug.php");
require(basename("modules/category/cat_nug.php"));
includes_end();
?>
<?php
includes_start("modules/manufacturers/man_nug.php");
require(basename("modules/manufacturers/man_nug.php"));
includes_end();
?>
<?php
includes_start("modules/offers/offer_nug.php");
require(basename("modules/offers/offer_nug.php"));
includes_end();
?> </td>
<td height="98%" valign="top" class="center_column"><?php
$incFileName = $mxiObj->getCurrentInclude();
if ($incFileName !== null) {
includes_start($incFileName);
require(basename($incFileName)); // require the page content
includes_end();
}
?></td>
<td width="1%" height="98%" align="right" valign="top">
<?php if (!preg_match) {?>
<?php
includes_start("modules/cart/cart_nug.php");
require(basename("modules/cart/cart_nug.php"));
ncludes_end();
?> <br>
<?php } // Show if dynamic field equalto
?>
<?php } ?>
<?php
// Show IF Conditional region2
if (!preg_match("['mod'])) {
?>
<?php
includes_start("modules/users/login_nug.php");
require(basename("modules/users/login_nug.php"));
includes_end();
?>
<br/>
<?php }
// endif Conditional region2
?>


<?php
//Show If User Is Logged In (region1)
$isLoggedIn = new UserLoggedIn($conn);
if ($isLoggedIn->Execute()) {
?>
<?php
includes_start("modules/orders/history_nug.php");
require(basename("modules/orders/history_nug.php"));
includes_end();
?>
<?php
}
//End Show If User Is Logged In (region1)
?></td>

<tr bgcolor="#CCCCCC">
<td colspan="3" height="1%" class="footer">
<div class="footer_left_links">Copyright 2007</div>

<div class="footer_right_text">Powered by </div> </td>
</tr>
</table>
</body>

</html>
<?php
mysql_free_result($1);

mysql_free_result($2);
?>[/HTML]
May 24 '07 #1
6 3690
drhowarddrfine
7,435 Expert 4TB
First quick observation: you will never get IE7 to pretend to act like a modern browser like Firefox without a proper doctype. See the article about doctypes in "Artcles" under HTML/CSS at the top of this page.

Then read the article about validating. You have 45 HTML errors and too many CSS errors.
May 24 '07 #2
First quick observation: you will never get IE7 to pretend to act like a modern browser like Firefox without a proper doctype. See the article about doctypes in "Artcles" under HTML/CSS at the top of this page.

Then read the article about validating. You have 45 HTML errors and too many CSS errors.
First of all, thanks for responding drhowarddrfine. I checked out both articles that you suggested. First I added the "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">" doctype to the page.

After adding the doctype, it seemed to make the font in certain tags on my page smaller and made the tables holding the information on the webpage move off to the right of the screen in IE 7. I'm sure this is probably due to the CORRECT interpretation of my html tags and CSS, but it doesn't quite solve my orginal problem and actually creates more problems I would need to deal with. I am definitely in the old thoughtform of "if it ain't broke, don't fix it".

I then validated the page with the online validation tool described in the second article. And although there are several validation errors that show up in the page, the errors were either related to issues with "conflicting colors" or were unrelated CSS tags (not realting to the page I am working on).

So currently I am still stumped on my issue..........thanks for taking a shot at it though.

Sirian
May 24 '07 #3
drhowarddrfine
7,435 Expert 4TB
I'm sure this is probably due to the CORRECT interpretation of my html tags and CSS
This is true.
, but it doesn't quite solve my orginal problem and actually creates more problems
Then it falls back to my original statement. You will NEVER get IE to act like modern browsers without a proper doctype and until you deal with that you will never get all browsers to appear the same.
May 24 '07 #4
This is true.
Then it falls back to my original statement. You will NEVER get IE to act like modern browsers without a proper doctype and until you deal with that you will never get all browsers to appear the same.
Hello again drhowarddrfine. I don't mind adding the correct doctype, but after that I am back to my original CSS issue.

Any suggestions on the original CSS issue after the correct doctype is added?

Anyone?

Sirian
May 24 '07 #5
drhowarddrfine
7,435 Expert 4TB
Let's see what happens when you remove the Xhtml end tags, the />. Remove the slash only. Those are for xhtml but you don't specify anything. Try it with and without the doctype.
May 24 '07 #6
Let's see what happens when you remove the Xhtml end tags, the />. Remove the slash only. Those are for xhtml but you don't specify anything. Try it with and without the doctype.
Hello again. I tried removing all Xhmtl slashes in the document with and without the doctype and it didn't seem to affect anything ....

I'm really starting to dislike IE. Microsoft's browser is definitely at the top of my "I hope you fall off the face of the universe (if that's possible)" list

Sirian
May 24 '07 #7

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

Similar topics

3
by: Jeremy Epstein | last post by:
I've got a 4-page form that lets users enter a whole lot of information, which is then submitted and emailed at the end. All the fields are stored as session data. The whole thing works fine: ...
6
by: Geoff | last post by:
When trying to focus a field in Firefox, I get the following error: Error: " nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame ::...
87
by: expertware | last post by:
Dear friends, My name is Pamela, I know little about CSS, but I would like to ask a question I have an image on a web page within a css layer: <DIV ID=MyLayer STYLE = "position:...
14
by: expertware | last post by:
Ok! to avoid confusion I will start a new argument. Thanks!! FIREFOX 1.0.7 AND IE6 viewed through DATATIME: a summary REPORT ===============================================================...
5
by: SPE - Stani's Python Editor | last post by:
Hi, During optimizing SPE for Ubuntu, I found something strange. I have Ubuntu 5.10 "The Breezy Badger" and unfortunately this code is not working: >>> import webbrowser >>>...
7
by: Coder | last post by:
Hi I have the following code in java script, it is not giving proper output in FIREFOX but running fine in IE... can anybody help me out to make this run in FIREFOX . <script...
12
by: amit | last post by:
Hello group, I'm kinda skeptical about a code is being used in my js program. All it does is checking what browser is being run and finds out if FLASH is installed or not. This code works...
6
by: scotty | last post by:
I have a script that loops through an existing table list and prepares each href element node to trigger a function when an image is clicked. The function that will be run passes a property value...
7
by: Carlos Mendonça | last post by:
Has anyone managed to get ClickOnce to work with Firefox? It seems to me that it still has the same issues VS 2K5 had. I appreciate any comments or tips.
3
by: SAL | last post by:
Hello, I did google this issue and found some stuff related to BrowserCaps section of either web.config or machine.config but it didn't work. It seems that most pages in my webapp are okay but a...
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...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.