473,382 Members | 1,357 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.

This page looks fine in IE8 but not IE7 cannot figure it out.

Alright I've been playing around with this for awhile and I can't seem to figure it out. The page looks fine in IE8 but IE7 does not seem to want to drop the margin of the background image for me.

HTML
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3.     <head>
  4.         <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
  5.         <script type="text/javascript" language="JavaScript" src="scripts/jquery.js"></script>
  6.         <script type="text/javascript" language="JavaScript" src="scripts/jquery.cookie.js"></script>
  7.         <script type="text/javascript" language="JavaScript" src="scripts/ddmenu.js"></script>
  8.         <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js"></script>
  9.         <link rel="stylesheet" type="text/css" href="style.css"/>
  10.         <title>My page</title>
  11.     </head>
  12.     <body>
  13.         <div id='site_container'>
  14.             <div id='header_container'>
  15.                 <div id='logo_container'>
  16.                     <a href='#'><img alt='320 East Logo' src='images/logo.png'/></a>
  17.                 </div>
  18.                 <div id='menu_container'>
  19.                     <div style='margin-left: 50px; height: 74px; text-align: center;'>
  20.                         <a href='#'><img class='menu_item' alt='Home' src='images/home_link.png'/></a>
  21.                         <a href='#'><img class='menu_item' alt='About Us' src='images/about_link.png'/></a>
  22.                         <a href='#'><img class='menu_item' alt='Estimate' src='images/estimate_link.png'/></a>
  23.                         <a href='#'><img class='menu_item' alt='Contact Us' src='images/contact_link.png'/></a>
  24.                     </div>
  25.                 </div>
  26.                 <div class='clearit'>
  27.                 </div>
  28.             </div>
  29. </div>
  30. </body>
  31. </html>
  32.  
CSS
Expand|Select|Wrap|Line Numbers
  1. html
  2. {
  3.     margin-top: 30px;
  4.     font: Arial;
  5. }
  6.  
  7. body
  8. {
  9.     background-repeat: repeat-x; background-image: url("images/headerbackg.jpg"); margin: 0px auto; width: 100%;
  10. }
  11.  
  12. a
  13. {
  14.     border-style: none;
  15. }
  16.  
  17. a img
  18. {
  19.     border-style: none;
  20. }
  21.  
  22. #site_container
  23. {
  24.     margin-top: -30px; width: 960px; margin-left: auto; margin-right: auto;
  25. }
  26.  
  27. #logo_container
  28. {
  29.     float: left;
  30.     width: 267px;
  31. }
  32.  
  33. #menu_container
  34. {
  35.     width: 693px;
  36.     margin-top: 30px;
  37.     float: right;
  38.     height: 74px;
  39. }
  40.  
  41. .menu_item:hover
  42. {
  43.     background-color: #67a2c7;
  44. }
  45.  
Any help would be appreciated. Thank you for your time.
Dec 23 '10 #1
2 2040
drhowarddrfine
7,435 Expert 4TB
Can you put this online? Without the images, it's difficult to see the problem.

Does it work correctly in any modern browser? You should always test first in anything but IE to make sure your markup displays correctly. Also, IE8 does not work like IE7 which doesn't work like IE6 which won't work like IE9 and none of them work correctly.

'font' is a CSS shorthand property. To only select a font family, use 'font-family'.

margins do not affect background images.
Dec 23 '10 #2
AutumnsDecay
170 100+
As drhowarddrfine said, we'd need to see a live demo.

Any reason you have 'auto' as one of your <body> margins? Try moving that and just have: margin:0px;
Dec 24 '10 #3

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

Similar topics

4
by: inquisitiveman2002 | last post by:
Hello, My webpage looks fine on my computer using IE v6.0, but looks way mis-aligned on my friend's computer eventhough he is using IE v6.0 also. Why is this happening? I do remember his IE saying...
21
by: Applebrownbetty | last post by:
Hi, I've run into a problem with IE 6 vs. Mozilla when displaying a completely CSS positioned page, and was wondering if any resident CSS guru might quickly be able to find the problem(s). Thank...
25
by: Steal | last post by:
Hi at all I try to validate this page using the link: http://validator.w3.org/ but it return that this is not a valid HTML 4.01 page please where is it error? Steil <!DOCTYPE HTML PUBLIC...
3
by: typingcat | last post by:
First, thank you for my previous post. But I'm afraid that I've returned with a more picky question. http://cat3.dotnet29.hostbasket.com/korean/ This page looks as I intended on Microsoft...
5
by: Hardy Wang | last post by:
Hi all: I developed a web site, it passed various testing internally. When I put this site in production, I receive some error reports from this site saying "the viewstate is invalid for this page...
0
by: hector | last post by:
Hi all, Need i simple example on how print/preview data from a database. I already have some code but I am lost because the preview does not create multiple pages and only shows the first page...
10
by: ashkaan57 | last post by:
The web site is in two languages, one in English and the other in Farsi (Persian) which is a right-to-left language. So, I used two stylesheets, with the same info, and changed the right and left...
2
by: JRamirez | last post by:
Need help cannot figure out where I made the error. -------------------------------------------------------------------------------- Can someone view what I have, I need help I cannot figure out...
3
by: Binx | last post by:
I am creating a website for a company, and it looks fine in Firefox, but when I look at it in IE, it is not centered. I am using dreamweaver MX, and can't see why it is doing that. Any suggestions?...
3
by: Nathan Sokalski | last post by:
I am recieving the following error on the second postback of a page I have written: The state information is invalid for this page and might be corrupted Stack Trace: ...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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...

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.