473,395 Members | 1,595 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 problems with IE

mikeinspain
Hi Guys..

Hope someone can help. I have a problem with a particular page on one of the sites I am developing. The page is here: http://tagwealth.co.uk/contact/.

The pages renders fine in Safari and Firefox, but it gets shunted to the left of the screen in IE.

The CSS for the page is below..

Expand|Select|Wrap|Line Numbers
  1. /********************************************
  2.    HTML ELEMENTS
  3. ********************************************/ 
  4.  
  5. /* top elements */
  6. * { padding: 0; margin: 0; }
  7.  
  8. body {
  9.     margin: 0;
  10.     padding: 0;
  11.     color: #333;
  12.     background: #FFF url(/images/bg.jpg) repeat-x;
  13.     text-align: center;
  14.     height: 100%;
  15.     font-family: Arial, Helvetica, sans-serif;
  16.     font-size: 0.72em;
  17.     font-style: normal;
  18.     line-height: 2.0em;
  19.     font-weight: normal;
  20.     font-variant: normal;
  21. }
  22.  
  23. /* links */
  24. a { background: inherit; color: #72A545; }
  25. a:hover { background: inherit; color: #006699; }
  26.  
  27. /* headers */
  28. h1, h2, h3 {
  29.     font: bold 1em 'Trebuchet MS', Tahoma, Sans-serif;
  30.     color: #82A7B0;
  31. }
  32. h1 { font-size: 1.4em; }
  33. h2 { font-size: 1.2em; text-transform: uppercase;}
  34. h3 { font-size: 1.2em; }
  35.  
  36. p, h1, h2, h3 {
  37.     margin: 10px 15px;
  38. }
  39. ul, ol {
  40.     margin: 10px 30px;
  41.     padding: 0 15px;    
  42.     color: #72A545;    
  43. }
  44. ul span, ol span {
  45.     color: #333;
  46. }
  47.  
  48. /* images */
  49. img {
  50.     border: 2px none #CCC;
  51. }
  52. img.float-right {
  53.   margin: 5px 0px 5px 15px;  
  54. }
  55. img.float-left {
  56.   margin: 5px 15px 5px 0px;
  57. }
  58. a img {  
  59.   border: 2px solid #72A545; /* #32CD32; */
  60. }
  61. a:hover img {  
  62.   border: 2px solid #806B4D !important; /* IE fix*/
  63.   border: 2px solid #72A545; /* #32CD32; */
  64. }
  65.  
  66. code {
  67.   margin: 5px 0;
  68.   padding: 10px;
  69.   text-align: left;
  70.   display: block;
  71.   overflow: auto;  
  72.   font: 500 1em/1.5em 'Lucida Console', 'courier new', monospace;
  73.   /* white-space: pre; */
  74.   background: #FAFAFA;
  75.   border: 1px solid #f2f2f2;  
  76.   border-left: 3px solid #72A545;
  77. }
  78. acronym {
  79.   cursor: help;
  80.   border-bottom: 1px solid #777;
  81. }
  82. blockquote {
  83.     margin: 15px;     padding: 0 0 0 20px;      
  84.       background-color: #FAFAFA; 
  85.     background-position: 8px 10px;
  86.     border: 1px solid #f2f2f2; 
  87.     border-left: 3px solid #72A545;  
  88.     font: bold 1.2em/1.5em "Trebuchet MS", Tahoma, sans-serif; 
  89.     color: #666666;    
  90. }
  91.  
  92. /* form elements */
  93. form {
  94.     margin:10px; padding: 0;
  95.     border: 1px solid #f2f2f2; 
  96.     background-color: #FAFAFA; 
  97. }
  98. label {
  99.     display:block;
  100.     font-weight:bold;
  101.     margin:5px 0;
  102. }
  103. input {
  104.     padding: 2px;
  105.     border:1px solid #eee;
  106.     font: normal 1em "Trebuchet MS", Tahoma, sans-serif;
  107.     color:#777;
  108. }
  109. textarea {
  110.     width:400px;
  111.     padding:2px;
  112.     font: normal 1em "Trebuchet MS", Tahoma, sans-serif;
  113.     border:1px solid #eee;
  114.     height:100px;
  115.     display:block;
  116.     color:#777;
  117. }
  118. input.button { 
  119.     margin: 0; 
  120.     font: bold 1em Arial, Sans-serif; 
  121.     border: 1px solid #CCC;
  122.     background: #FFF; 
  123.     padding: 2px 3px; 
  124.     color: #333;    
  125. }
  126.  
  127. /* search form */
  128. .searchform {
  129.     background-color: transparent;
  130.     border: none;    margin: 0; padding: 0;    
  131. }
  132. .searchform p { margin: 10px; padding: 0; }
  133. .searchform input.textbox { 
  134.     width: 130px;
  135.     color: #333; 
  136.     height: 20px;
  137.     padding: 2px;    
  138.     vertical-align: top;
  139. }
  140. .searchform input.button { 
  141.     font: bold 12px Arial, Sans-serif; 
  142.     color: #333;    
  143.     width: 60px;
  144.     height: 26px;
  145.     border: none;
  146.     padding: 3px 5px;    
  147.     vertical-align: top;
  148. }
  149.  
  150. /***********************
  151.       LAYOUT
  152. ************************/
  153.  
  154. #header-content, #content, #footer-content {
  155.     width: 760px;
  156. }
  157.  
  158. /* header */
  159. #header {
  160.     height: 100px;
  161.     text-align: left;    
  162. }
  163. #header-content {
  164.     position: relative;
  165.     margin: 0 auto; padding: 0;
  166. }
  167. #header-content #logo {
  168.     position: absolute;
  169.     letter-spacing: inherit;
  170.     color: #FFF;
  171.     margin: 0;
  172.     padding: 1;
  173.     /* change the values of left and top to adjust the position of the logo */
  174.     top: 9px;
  175.     left: 0px;
  176.     font-family: "ATRotis Semiserif 55", sans-serif, serif;
  177.     font-size: 30px;
  178.     font-weight: bold;
  179.     width: 288px;
  180.     height: 44px;
  181. }
  182. #header-content #slogan {
  183.     position: absolute;    
  184.     font: bold 1.1em 'Trebuchet Ms', Sans-serif;
  185.     text-transform: none;
  186.     color: #FFF;    
  187.     margin: 0; padding: 0;
  188.  
  189.     /* change the values of left and top to adjust the position of the slogan */
  190.     top: 55px; left: 40px;
  191. }
  192.  
  193. /* header menu */
  194. #header-content ul {
  195.     position: absolute;
  196.     right: -5px; top: 15px;
  197.     font: bolder 1.3em 'Trebuchet MS', sans-serif;
  198.     color: #FFF;
  199.     list-style: none;
  200.     margin: 0; padding: 0;        
  201. }
  202. #header-content li {
  203.     display: inline;
  204. }
  205. #header-content li a {
  206.     float: left;
  207.     display: block;
  208.     padding: 3px 12px;    
  209.     color: #FFF;
  210.     background-color: #333;
  211.     text-decoration: none;
  212.     border-right: 1px solid #272727;
  213. }
  214. #header-content li a:hover {
  215.     background: #65944A;
  216.     color: #FFF;
  217. }
  218. #header-content li a#current  {
  219.     background: #65944A;
  220.     color: #FFF;
  221. }
  222.  
  223. /* header photo */
  224. .headerphoto {
  225.     margin: 0 auto;
  226.     width: 770px;
  227.     height: 200px;
  228.     padding: 15px 10px 10px 10px; 
  229.     background: #FFF url(/images/headerphoto.jpg) no-repeat center;    
  230. }
  231.  
  232. /* content */
  233. #content-wrap {
  234.     clear: both;
  235.     float: left;
  236.     width: 100%;
  237. }
  238. #content {
  239.     text-align: left;    
  240.     padding: 0;
  241.     margin: 0 auto;    
  242. }
  243.  
  244. /* sidebar */
  245. #sidebar {
  246.     float: right;
  247.     width: 30%;
  248.     margin: 0 0 10px 0; padding: 0;    
  249. }    
  250. #sidebar h1 {
  251.     padding: 10px 0px 5px 10px;
  252.     margin: 0;    
  253. }
  254. .sidebox {
  255.     background: #F2F2F2;
  256.     border: 1px solid #EFEDED;
  257.     margin-bottom: 10px;
  258. }
  259.  
  260. /* sidebar menu */
  261. #sidebar ul.sidemenu {
  262.     list-style:none;
  263.     margin: 10px 0;
  264.     padding: 0;
  265.     background: #F2F2F2;            
  266. }
  267. #sidebar ul.sidemenu li {
  268.     padding: 0px 10px;
  269. }
  270. #sidebar ul.sidemenu a {
  271.     display:block;
  272.     font-weight:normal;
  273.     color: #333;
  274.     height: 1.5em;    
  275.     padding:.3em 0 .3em 15px;
  276.     line-height: 1.5em;
  277.     border-bottom: 1px dashed #CCC;
  278.     text-decoration:none;
  279. }
  280. #sidebar ul.sidemenu a.top{    
  281.     border-top: 1px dashed #CCC;
  282. }
  283. #sidebar ul.sidemenu a:hover {
  284.     padding: .3em 0 .3em 10px;
  285.     border-left: 5px solid  #65944A;
  286.     color: #65944A;        
  287. }
  288.  
  289. /* main */
  290. #main {
  291.     float: left;
  292.     width: 68%;    
  293.     margin: 0 0 10px 0; padding: 0;    
  294. }
  295. #main h1 {
  296.     padding: 10px 0 5px 5px;
  297.     margin: 0 0 0 10px;
  298.     border-bottom: 1px solid #f2f2f2;     
  299. }
  300.  
  301. .post {
  302.     margin: 0;
  303.     padding: 0;
  304.     border: 1px solid #EFEDED;
  305.     background-color: #FFF;
  306.     background-image: url(/images/gradientbg.jpg);
  307.     background-repeat: repeat-x;
  308. }
  309. .post .post-footer {
  310.     background-color: #FAFAFA;
  311.     border: 1px solid #f2f2f2;
  312.     padding: 5px; margin-top: 20px;
  313.     font-size: 95%;
  314. }
  315. .post .post-footer .date {
  316.     background: url('clock.gif') no-repeat 0 center;
  317.     padding-left: 20px; margin: 0 10px 0 5px;
  318. }
  319. .post .post-footer .comments {
  320.     background: url('comment.gif') no-repeat 0 center;
  321.     padding-left: 20px; margin: 0 10px 0 5px;
  322. }
  323. .post .post-footer .readmore {
  324.     background: url('page.gif') no-repeat 0 center;
  325.     padding-left: 20px; margin: 0 10px 0 5px;
  326. }
  327.  
  328. /* footer */
  329. #footer {
  330.     clear: both;
  331.     margin: 0; padding: 0;
  332.     font: normal .95em/1.5em 'Trebuchet MS', Tahoma, Arial, sans-serif;
  333.     text-align: left;    
  334. }
  335. #footer h3, #footer p {
  336.     margin-left: 0;
  337. }
  338. #footer-content {    
  339.     border-top: 1px solid #EAEAEA;
  340.     margin: 0 auto;
  341.     padding-left: 15px;
  342. }
  343. #footer-content a {
  344.     text-decoration: none;
  345.     color: #777;    
  346. }
  347. #footer-content a:hover {
  348.     text-decoration: underline;
  349.     color: #333;
  350. }
  351. #footer-content ul {
  352.     list-style: none;
  353.     margin: 0; padding: 0;
  354. }
  355. #footer-content .col {
  356.     width: 32%;
  357.     padding: 0 5px 30px 0;    
  358. }
  359. #footer-content .col2 {
  360.     width: 33%;
  361.     padding: 0 0 30px 0;    
  362. }
  363.  
  364. /* alignment classes */
  365. .float-left  { float: left; }
  366. .float-right { float: right; }
  367. .align-left  { text-align: left; }
  368. .align-right {    text-align: right; }
  369.  
  370. /* additional classes */
  371. .clear { clear: both; }
  372. .gray  { color: #BFBFBF; }
  373.  
I have no idea why this happening. Would someone be kind enough to point me in the right direction. Thanks Mike
Apr 19 '07 #1
6 2241
PS: I forgot to include this bit of CSS that is in the php file.

Expand|Select|Wrap|Line Numbers
  1.     <style type='text/css' media='screen,projection'>
  2.         <style type='text/css' media='screen,projection'>
  3.     <!--
  4.     body { margin:20px auto;width:500px;padding:20px;border:1px solid #ccc;background:#fff;font-family:georgia,times,serif; }
  5.     fieldset { border:0;margin:0;padding:0; }
  6.     label { display:block; }
  7.     input.text,textarea {
  8.     width:300px;
  9.     color:#333;
  10.     padding:3px;
  11.     margin:1px 0;
  12.     border:1px solid #ccc;
  13.     font-family: 'courier new', courier, monospace;
  14.     font-size: 16px;
  15.     line-height: 25px;
  16. }
  17.     input.submit { padding:2px 5px;font:bold 12px/12px verdana,arial,sans-serif; }
  18.  
  19.     -->
  20.     </style>

thanks Mike
Apr 19 '07 #2
drhowarddrfine
7,435 Expert 4TB
As usual, the solution is validate your html and css and fix the errors listed there.
Apr 19 '07 #3
As usual, the solution is validate your html and css and fix the errors listed there.
Thanks for that. I am have tried going through the 2 error pages for xhtml and css, but I really can't seem to get this particular page to display correctly in IE. As mentioned safari, firefox etc.. are all ok and indeed IE except for the one page where it all gets shifted to the left...

Is it a case of perhaps inputting a little IE hack to render it correct on the screen or is there perhaps an easier solution?

I have reverted back to the original code for this page now.

Thanks

Mike
Apr 20 '07 #4
drhowarddrfine
7,435 Expert 4TB
iirc, and it is the case now, you are missing the ending </style> tag. How does IE react to this? I don't know. But it's hard enough to work with code that validates than one with 20 html errors as it is now. Maybe it will fix it, maybe it won't. But at least we can eliminate those possibilities.
Apr 20 '07 #5
iirc, and it is the case now, you are missing the ending </style> tag. How does IE react to this? I don't know. But it's hard enough to work with code that validates than one with 20 html errors as it is now. Maybe it will fix it, maybe it won't. But at least we can eliminate those possibilities.
Sorry if this is a really stupid question, and I really appreciate your help but below is my first rows of code: I see that I have that tag </style> there..??

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  3. <head>
  4.     <script type="text/javascript" src="js/functionAddEvent.js"></script>
  5.     <script type="text/javascript" src="js/contact.js"></script>
  6.     <script type="text/javascript" src="js/xmlHttp.js"></script>
  7.     <style type='text/css' media='screen,projection'>
  8.         <style type='text/css' media='screen,projection'>
  9.     <!--
  10.     body { margin:20px auto;width:500px;padding:20px;border:1px solid #ccc;background:#fff;font-family:georgia,times,serif; }
  11.     fieldset { border:0;margin:0;padding:0; }
  12.     label { display:block; }
  13.     input.text,textarea {
  14.     width:300px;
  15.     color:#333;
  16.     padding:3px;
  17.     margin:1px 0;
  18.     border:1px solid #ccc;
  19.     font-family: 'georgia,times,serif;
  20.     font-size: 16px;
  21.     line-height: 25px;
  22. }
  23.     input.submit { padding:2px 5px;font:bold 12px/12px verdana,arial,sans-serif; }
  24.  
  25.     -->
  26.     </style>
  27. <meta name="Description" content="Information architecture, Web Design, Web Standards." />
  28. <meta name="Keywords" content="your, keywords" />
  29.  
  30. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  31. <meta name="Distribution" content="Global" />
  32. <meta name="Author" content="Erwin Aligam - ealigam@gmail.com" />
  33. <meta name="Robots" content="index,follow" />
  34. <link rel="stylesheet" href="/css/PixelGreen.css" type="text/css" />
  35. <title>//  TAG WEALTH MANAGEMENT  //  Pensions  //  Investments  //  Retirement Planning  //</title>
  36. </head>
Apr 20 '07 #6
drhowarddrfine
7,435 Expert 4TB
I just went by what the validator said. But you have two <style> tags. Remove one. Might be confusing to a browser. Also, add a <title></title>. That will confuse the validator, too.
Apr 20 '07 #7

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

Similar topics

0
by: Jerome Lefebvre | last post by:
Hello, Hope this will interest a few. I been working with a friend on the problems given out during the "International Collegiate Programming Contest" (ICPC) http://icpc.baylor.edu/icpc/ ....
14
by: Jim Hubbard | last post by:
Are you up to speed on the difficulties in using the 1.1 .Net framework? Not if you are unaware of the 1,596 issues listed at KBAlertz (http://www.kbalertz.com/technology_3.aspx). If you are...
1
by: 3f | last post by:
Hello; We have made a web application that people can download from our web site and installed on: Windows XP Windows 2000 Professional Windows 2003 Server Windows 2000 Server
5
by: Corky | last post by:
This works: db2 SELECT DISTINCT PROBLEM_OBJECTS.PROBLEM_ID FROM PROBLEM_OBJECTS INNER JOIN PROBLEMS ON PROBLEM_OBJECTS.PROBLEM_ID = PROBLEMS.PROBLEM_ID WHERE INTEGER(DAYS(CURRENT DATE) -...
2
by: Ellen Graves | last post by:
I am having a lot of problems with DB2 8.3.1 on RH Linux AS2.1. Installing and running stored procedures is problematic. Stored procedures I have used for years on V7 on WinNT are now failing...
19
by: Jim | last post by:
I have spent the past few weeks designing a database for my company. The problem is I have started running into what I believe are stack overflow problems. There are two tab controls on the form...
10
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ...
19
by: Dales | last post by:
I have a custom control that builds what we refer to as "Formlets" around some content in a page. These are basically content "wrapper" sections that are tables that have a colored header and...
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
0
by: Sergistm | last post by:
Hello World, :D I have a problem that it is making me crazy, I hope you can help me. I'm trying to execute a .exe file with the Procces.Start, and there is no problem when the file is on my...
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...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.