natimage Posted February 5, 2004 Posted February 5, 2004 I'm trying to learn some advanced css (well...advanced for me) and I've had a snag right off the bat! I put together some pretty simple code that I can't quite make work. And, it's not uploaded to any of my accounts right now, so I can't offer a sample page until this evening. Here is the code, though. Like I said...this is just a trial that I'm trying to make work: ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso8859-1"> <style type="text/css"> <!-- h2.swap {background-repeat:no-repeat; height:30px;} h2.swap span {display:none;} h2#t_asts {background-image:url("images/nav/t_asts.gif");} h2#t_sections {background-image:url("images/nav/t_sections.gif");} --> </style> </head> <body> <div> <h2 class="swap" id="t_asts"><span>302 ASTS</span></h2></div> <hr /> <div> <h2 class="swap" id="t_sections"><span>Sections</span></h2></div> </body> </html> What's happening is that the "h2 id=t_sections" is showing up, but not the "h2 id=t_asts"! Both images are in the same directory, so it just doesn't make sense to me that one is showing up and not the other! Quote
natimage Posted February 5, 2004 Author Posted February 5, 2004 Nevermind...I found the problem. The code above should actually work, but in the file on my laptop, I had a - instead of a _ in the "h2#t_asts". Sorry to post and then find the error...I had been messing with it for about an hour though!!!! Quote
natimage Posted February 5, 2004 Author Posted February 5, 2004 Don't I know...I probably would have been willing to bet my entire savings account that it was something stupid like that! I'd be pretty productive most days if I didn't waste my time on things like that!! Quote
TCH-Bruce Posted February 5, 2004 Posted February 5, 2004 I'd be pretty productive most days if I didn't waste my time on things like that!! I know how you feel! I do it all the time. Quote
kaseytraeger Posted February 7, 2004 Posted February 7, 2004 You have no idea how many times I've tried to run a program I've written only to find that it's a missing semi-colon or some other missing character (usually something that's very hard to see, like the difference between a single quote and a double quote) that keeps it from compiling...UGH! I know exactly how you feel. But ........ I'll bet this will be something that you'll look more carefully for in the future, right? That's been the case with me. I have trained myself to look for those things almost immediately! One more trick/tool in your bag that you'll always be on the lookout for. Kasey Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.