Please help, Firefox/IE compatibility....

They have: 2 posts

Joined: Jul 2005

here is the code......


<
title>to fix this.html

#navbar {width:250px; border : 1px solid #FFFF66;};
#navbar a{ color:#000000; background-color:#660099; width:250; height:20; text-align:center; text-decoration:none; font-size:12;}

test

Now i know it isnt laye dout exactly as it should be, but if you run it in both IE and Firefox you get different results. Can someone suggest why IE displays it correctly and why Firefox doesnt??

Thankyou

Tom

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

#navbar a{ color:#000000; background-color:#660099; width:250; height:20; text-align:center; text-decoration:none; font-size:12;}

Always define units. 250 what? cows? 20 what? apples?

They have: 2 posts

Joined: Jul 2005

i have tried adding px to the end but this has no effect on the colours not showing in firefox. Confused

He has: 388 posts

Joined: Apr 2005

I think for firefox you hve to put the border style before any other border stuff.
im not sure about this but its worth a try.

He has: 11 posts

Joined: Jul 2005

I solved your problem, as it was very simple. It will cause another problem though (as the link is not the full width of the box).

<html>
<head>
<title>to fix this.html</title>
<style type="text/css">
#navbar {
  width:250px;
  border : 1px solid #FFFF66;
}
#navbar a {
  color:#000000;
  background-color:#660099;
  width:250px;
  height:20px;
  text-align:center;
  text-decoration:none;
  font-size:12pt;
}
</style>
</head>
<body>

  <div id="navbar"><a href="">test</a></div>

</body>
</html>
'

That should get your purple in there, you had an extra ; in your code. Hope this gives you a starting point to get it to work the rest of the way.

- James

What's Your Factor? - T-shirt Design Contest (FREE to enter)
Design Studio Magazine - connecting designers with ASP, CSS, PHP, SEO, Graphics, and more
Christian Designs - where quality and honesty share a friendship.
Focus Minded - my Blog

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.