Page 1 of 1

my first css code

Posted: Sat Jul 28, 2007 7:29 pm
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:

Posted: Sat Jul 28, 2007 7:39 pm
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

Posted: Sat Jul 28, 2007 9:25 pm
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.

Posted: Sat Jul 28, 2007 9:58 pm
by Charles256
Wow.. I can't believe I didn't notice he did that. Good eyes califdone.

Posted: Sun Jul 29, 2007 8:27 am
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...