473,386 Members | 2,042 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,386 software developers and data experts.

IE 7 problem with width

194 100+
hi everyone,

there is some very very basic code dat i tried to see how things working in CSS. but at the very begining this is what im getting here. here is the code:

Expand|Select|Wrap|Line Numbers
  1.  
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3.  
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title>Untitled Document</title>
  8.  
  9. <style type="text/css">
  10.  
  11. <!--
  12. body, div{
  13.     margin:0;
  14.     padding:0;
  15.  
  16. }
  17. #header {
  18.  
  19. }
  20. #header #left {
  21.     background-color: #036;
  22.     height: 100px;
  23.     width: 50%;
  24.     float: left;
  25.  
  26. }
  27. #header #right {
  28.     background-color: #666;
  29.     width: 50%;
  30.     float: right;
  31.     height:100px;
  32.  
  33. }
  34. -->
  35. </style><body>
  36. <div id="header">
  37.   <div id="left"></div>
  38.   <div id="right"></div>
  39. </div>
  40.  
  41.  
  42.  
  43. </body>
  44. </html>
  45.  
  46.  
this is working fine in firefox but in IE7 it is bit different i dont know why this is very simple code though. the blue div is up and grey div is down of it. please tell me why it is happening? i will be grateful to you. and tell me the solution.

thanx again.
Apr 30 '09 #1
1 1561
acoder
16,027 Expert Mod 8TB
You have a missing closing head tag.

Instead of 50%, try making it 49.99% and you can float it left instead of right.
May 1 '09 #2

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

Similar topics

4
by: Charles Russell | last post by:
I am trying to have a fixed top and side sections with scrolling content. Both side sections have navigation links. The side provides external navigation and the top provides internal navigation....
5
by: Zambien | last post by:
Hi all, Here's my problem. I have tables that are using the menu/submenu idea for hiding rows. This works fine in IE (of course) and does show/hide correctly in netscape, but as soon as the...
3
by: Robert Dell | last post by:
I have a problem comparing strings in an order form i'm writing. I want to give a running total at the bottom of the page and it appears to be working except it doesn't compare correctly (it...
2
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at...
5
by: Craig Keightley | last post by:
Please help, i have attached my page which worksin IE but i cannnot get the drop down menu to fucntion in firefox. Any one have any ideas why? Many Thanks Craig ...
2
by: Yonatan Goraly | last post by:
I am in the process of adding PostgreSQL support for an application, in addition to Oracle and MS SQL. I am using PostgreSQL version 7.3.2, Red Hat 9.0 on Intel Pentium III board. I have a...
4
by: Rodrigo DeJuana | last post by:
Howdy, I'm new to this .net stuff and really have little to no training. Im trying to create a new page for a web form, so i have been pretty much jsut coping code. I having some issue with...
2
by: Goober | last post by:
I have the following default.aspx page that works properly. However, what I want to do is to link the graphics within it (that are hard coded now in the default web page) to our corporate...
10
by: Stephen.Schoenberger | last post by:
Hello, Sorry if this is not "exactly" a C topic but I thought this would be the best place to start. I need some guidance on working with bitmap images in ANSI C. I need to "read" in a bitmap...
2
by: swethak | last post by:
hi , i write the code in .htm file. It is in cgi-bin/searches/one.htm.In that i write a form submitting and validations.But validations are not worked in that .htm file. I used the same code in my...
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: 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
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.