By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,501 Members | 1,245 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,501 IT Pros & Developers. It's quick & easy.

Padding in internet explorer

P: 1
Hi,

For some reason my webpage is not accounting for the padding I have added in my css file. In firefox and Safari it is fine but not in IE version 7. I am new to css html so have no clue as to why this is.

If you visit the page at www.jgurteen.co.uk/resolve/test.html in IE you will be able to see the problem

the blue and yellow div tags should have padding.

for the css file visit ...resolve/dinard.css

any ideas as to why this is?

thanks
Nov 10 '08 #1
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 397
Of course it is not working in IE. No doctype. No work in IE.

A doctype and proper character encoding has been added to your page (see below). It now validates XHTML 1.0 Strict. And works as intended in IE/6.0 and IE/7.0.
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta name="generator" content=
  6. "HTML Tidy for Linux/x86 (vers 11 February 2007), see www.w3.org" />
  7. <meta http-equiv="content-type"
  8. content="text/html; charset=utf-8" />
  9.  
  10. <!--
  11. <html>
  12.  
  13.   <head>
  14. -->  
  15.  
  16.  <link rel="stylesheet" type="text/css" href="dinard.css" />
  17.  <title>Dinard</title>
  18.    </head>
  19.  
  20.  
  21. <body>
  22.  
  23.  
  24. <div id="wrap">
  25.      <div id="topstrip">
  26.  
  27.      <div id="highertopstrip"></div>
  28. <div id="middletopstrip">
  29.  
  30.      <a href="index.html">HOME</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  31.      <a href="location.html">LOCATION</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  32.      <a href="activities.html">ACTIVITIES</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  33.      <a href="rooms.html">ROOMS</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          
  34.      <a href="tariffs.html">TARIFFS</a>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      
  35.      <a href="availabilty.html">AVAILABILITY</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          
  36.      <a href="bookings.html">BOOKINGS</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   
  37.      CONTACT
  38.  
  39. </div>
  40.      <div id="lowertopstrip"></div>
  41.  
  42.  
  43. </div> 
  44.  
  45. <div id="content">
  46. <div id="maintext"></div>
  47. <div id="mainimage"></div>
  48. </div>
  49. <div id="lowerstrip"></div>
  50.  
  51.  
  52. </div>
  53.  
  54. </body>
  55. </html>
  56.  
  57.  
Nov 10 '08 #2

Expert 100+
P: 397
As of this writing, you're still running an invalid file . That will never do. Your markup is still not valid. Compare the file I posted to the forum with your file you now have online. Note what I commented out, with what you neglected to comment out.

Think of the w3c Markup Validation Service as your best friend.

PS I do not play games, and you are more than welcome...
Nov 11 '08 #3

Post your reply

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