FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

css problem

 


starfish2007
I have problems with the background color i set using css it works in internet explorer but not in fier fox here is the code i am using:
<code>
<style>
* { font-family: Arial, Tahoma, verdana; font-size: 12pt; COLOR: blue;background-color: #ADD8E6
}

</style>



</code>
note the text color works in both browsersjust not the background one any idea why this is? thanks
welshsteve
Only thing I can see wrong is you are using <style> instead of <style type="text/css">

There is nothing wrong with that code otherwise, I created a test below and it worked fine.

Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
   
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test</title>

<style type="text/css">
*
{
  font-family: Arial, Tahoma, verdana;
  font-size: 12pt;
  color: blue;
  background-color: #ffa;
}

</style>
</head>
<body>
<p>This is a test</p>
</body>
</html>


Could you post your entire page code so that we can check if there aren't any contradictions in it?
starfish2007
here is the page as it now have im still in the process of adding things to it
Code:



<html>

<head>

<title>computer support home page</title>
 <style type="text/css">

   * { font-family: Arial, Tahoma, verdana; font-size: 12pt; COLOR: blue;background-color: #ADD8E6   
}

</style>
</head>

<body >

<h1>   welcome to the computer-support home page</h1>
<div align=center >


   <table border="1" cellpadding="0" cellspacing="0" width="76%" id="main" height="365">
<th>you can view some of the most common
 computer problems and there solution, or you can submit your own computer problem if its not listed here </th>

   <tr valign="top" class="table">
   <td>
<br>

please note this site is still under construction  however if you have a computer problem you need solved please use the submit problem form at the end of the page to submit it and I will try and respond to it as soon as possable.


 <b><u>Common computer Problems and Possible Solutions</u></b>

<ul>
<li>Windows 2000</li>
<li>Windows Millennium</li>
<li>Windows XP</li>


</ul>

<br>
to submit your problems pleas <a href="http://computer-support.frih.net/form2.php">click here </a>


</td>

</tr>
</table>




</div >

</body>

</html>


[/code]
sonam
Just insert space after color definition blue.
COLOR: blue; background-color: #ADD8E6

Sonam
starfish2007
thanks for all your help i never wouldof detected the lack of aspace there one of the disavantiges of bing blind. guess my sckreen reader mist it lol thathappens some times
JinTenshi
typing ur code in a more organized manner would have helped. Wink

E.g.

body {
font-size: 12px;
background: blue;
}


Not typing in one long line really helps you visually. Plus, less mistake made.
welshsteve
JinTenshi wrote:
typing ur code in a more organized manner would have helped. Wink

E.g.

body {
font-size: 12px;
background: blue;
}


Not typing in one long line really helps you visually. Plus, less mistake made.


Completely agree with this, I always type my CSS in the form of


element
{
attribute: value;
}
Azmo
I always write my css like this.. saves alot of time when you work on bigger projects or are tired after like 12 hours of coding..

Code:
/*---explanation of what css I have below this point---*/

element {
   attribute:value;
   attribute2:value;
}


/*---new explanation for next element etc..---*/
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.