473,395 Members | 1,343 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.

How a web page can set same appearance in different browsers?

I created a simple web page with gradient background settings and some texts.I can see my web page in google chrome at its original structure that i give.But in IE it changes.I could not see the gradient background I applied.Can any one help me to fix this problem?How can i give a default structure in all browsers?
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 http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  5. <title>Contact us</title>
  6. </head>
  7. <style type="text/css">
  8. body
  9.  
  10. {
  11. background-color:#000000;
  12. }
  13. .adv
  14. {
  15. background-image:url('p5.jpg');
  16. height:100px;
  17. width:auto;
  18.  
  19. }
  20.  
  21. .css-grd {
  22.  
  23. /* default background colour, for all layout engines that don't implement gradients */
  24.  
  25.  
  26. /* gecko based browsers */
  27. /*background: -moz-linear-gradient(top, #55aaee, #003366);*/
  28. background: -moz-linear-gradient(top, #800000 , #804040);
  29. border:0px, solid;
  30.  -webkit-border-radius:30px;
  31.  -moz-border-radius:30px;
  32. /* webkit based browsers */
  33. /*background: -webkit-gradient(linear, left top, left bottom, from(#55aaee), to(#003366));*/
  34. background: -webkit-gradient(linear,left top, left bottom, from(#800000),to(#804040));
  35.  
  36. color: #000000; /* text colour (black) */
  37. height:50px; /* gradient uses the full height of the element */
  38.  
  39. padding: 5px; /* distance from border edge to text */
  40. }
  41. .css-grd2
  42. {
  43. background: -moz-linear-gradient(top, #800000 , #804040);
  44. border:0px,solid;
  45. -webkit-border-radius:30px;
  46. -moz-border-radius:30px;
  47. background: -webkit-gradient(linear,left top,left bottom,from(#800000),to(#804040));
  48. height:600px;
  49. }
  50. div.pne
  51. {
  52. background: -moz-linear-gradient(top, #804040 , #800000);
  53. border:0px,solid;
  54. -webkit-border-radius:30px;
  55. -moz-border-radius:30px;
  56.  
  57. background: -webkit-gradient(linear,left top,left bottom,from(#804040),to(#800000));
  58. padding-left:10px;
  59. height:10px;
  60. width:400px;
  61.  
  62. }
  63. .cont
  64. {
  65. font:"Times New Roman", Times, serif;
  66. color:#FFFFFF;
  67. font-size:300%;
  68. font-style:italic;
  69. font-weight:bold;
  70. padding-left:30px;
  71.  
  72. }
  73. .conttab
  74. {
  75. font:"Times New Roman", Times, serif;
  76. color:#FFFFFF;
  77. font-size:150%;
  78. font-style:italic;
  79. font-weight:bold;
  80. padding-left:60px;
  81.  
  82. }
  83.  
  84. ul {
  85.  
  86.     padding:0px;
  87.  
  88.     margin:auto;
  89.  
  90.     list-style:none;
  91.  
  92.     float:right;
  93.  
  94. }
  95.  
  96. ul li {
  97.  
  98.     float:left;
  99.     display:block; /*For ignore double margin in IE6*/
  100.  
  101.     margin: 10px;
  102.  
  103. }
  104.  
  105.  
  106. ul li a {
  107.  
  108.     text-decoration:none;
  109.  
  110.     float:right;
  111.  
  112.     color:#FFFFFF;
  113.  
  114.     cursor: pointer;
  115.  
  116.     font: 900 14px/22px "Arial", Helvetica, sans-serif;
  117.  
  118. }
  119.  
  120.  
  121.  
  122.  
  123. ul li a span {
  124.  
  125.     margin:inherit /*0 10px 0 -10px;*/
  126.  
  127.    padding: 1px 8px 5px 18px;
  128.  
  129.     position: relative; /*To fix IE6 problem (not displaying)*/
  130.  
  131.   float:left;
  132.  
  133. }
  134.  
  135. </style>
  136. <body>
  137.  
  138. <div class="adv"><br />
  139.  
  140. <div id="ii" class="css-grd">
  141. <div id="nav" class="current">
  142.         <ul>
  143.  
  144.             <li><a href="#">Home</a></li>
  145.             <li><a href="#">About Us</a></li>
  146.             <li><a href="#">Our Services</a></li>
  147.             <li><a href="#">Our Clients</a></li>
  148.             <li><a href="#">Gallery</a></li>
  149.             <li><a href="#">Careers</a></li>
  150.             <li><a href="#">Contact Us</a></li>
  151.         </ul>
  152.     </div>
  153. </div>
  154. </div>
  155.  
  156. <div class="css-grd2">
  157. <p><div class="cont"><br />Contact Us</div></p>
  158. <div class="pne"></div><br />
  159. <div class="conttab"> Phone number:06jjgjgjhjh<br />Mobile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :900000000<br />
  160. Fax:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:97100000000
  161. <br />
  162. E-mail:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ssss@legendsdubai.com
  163.  
  164. </div>
  165. <div class="trans25"></div>
  166. </div>
  167.  
  168. </body>
  169. </html>
  170.  
  171.  
Nov 23 '10 #1
1 1839
drhowarddrfine
7,435 Expert 4TB
The gradient property only works in modern browsers. IE is not a modern browser.
Nov 23 '10 #2

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

Similar topics

2
by: Econ | last post by:
XML as part of HTML in different browsers In one folder are few files - XML - file with data - HTML - file with static text - XSL - file for transformation XML data into HTML - CSS -...
5
by: Gaz | last post by:
Hi, I have found an issue when comparing Firefox with IE6 (Windows) where a page links to a css file that is in it's own directory. IE6 URL property of the background css element uses the...
6
by: Doug Mazzacua | last post by:
I noticed that that <ul> lists display differently with <br> between <li>s in IE and Mozilla. Does anyone know of a reference that catalogs all of the known types of differences in display...
2
by: birdstep | last post by:
We are using a 3rd party help system, and there are some bugs with the CTRL+mousescroll on different browsers. In IE 6+, it seems that text sizes and the boxes do, however in some other browsers,...
3
by: pradeep | last post by:
Hello, Can any one tell me different functions or properties of javascript which are gives different outputs on different browsers ? Thanks in advance. Bye
16
by: LayneMitch | last post by:
Greetings everyone. I'm new to the webdevelopment game and I developed my first site that looks good in IE but crappy in Mozilla/Firefox. Any advice on making my site browser to browser...
1
by: piscesabhi | last post by:
Is there a way to auto resize the website, when using different browsers? I was using this javascript earlier but i don't want to specify dimensions........i would like it to automatically adjust...
0
by: RyGa | last post by:
I know this is a bit off-subject, but not completely.. I am getting fed up opening multiple different browsers to test layout render for a given page.. I am wondering if there is a utility...
10
mariko
by: mariko | last post by:
I know that there are different margins in different browsers. I tried the Global Reset and it didn't help. I am a beginner, so I might be doing something wrong and I won't be offended if you...
1
by: saritha pulluri | last post by:
I get different outputs in different browsers. Please help me to find a solution. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <%@ Register...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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:
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.