my first css code

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
m2babaey
Forum Contributor
Posts: 364
Joined: Sun May 20, 2007 9:26 am

my first css code

Post by m2babaey »

Hi
I want to code something like this:
http://pedia.sys17.net/css1.htm
using the code below:

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=windows-1250">
  <meta name="generator" content="PSPad editor, http://www.pspad.com">
  <title></title>
  <style type="text/css">
  img.1 {z-index:-1;}
  img.2 {top:20px;
  left=0px;
  }
div {display: none}
</style>
  
  </head>
  <body>
<img class="1" border="0" src="big.jpg" width="720" height="180">
<img class="2"  src="login.gif" >

  <img class="2" border="0" src="logout.gif" width="144" height="72"><img class="2" border="0" src="add.gif" width="144" height="72"><img class="2" border="0" src="pass.gif" width="144" height="72"></p>
 </body>
</html>
but you see it's not working. what is wrong? :roll:
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

You could try absolute positioning (i.e. position:absolute;) but in your case I'd just use a background color to replicate that instead of that big huge background image :-D
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Post by califdon »

I ran into this recently. You can't name, or even begin the name of a class with a numeral. Change to img.a and img.b.
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

Wow.. I can't believe I didn't notice he did that. Good eyes califdone.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

califdon wrote:I ran into this recently. You can't name, or even begin the name of a class with a numeral. Change to img.a and img.b.
I think that IE allows it though. Ahh, Microsoft...
Post Reply