July 26, 201214 yr I am using Dreamweaver CS5 to design a website. I don't have a link, as it is only on my local testing server right now. I have attached my code. The built-in behaviors are killing me. I inserted nav items as rollover images. The rollovers work, but the link only seems to work in Firefox, not in Chrome when I am testing it. I know that it is better to hand-code than use built in behaviors. I am learning PHP, but am not yet up to learning JavaScript (I had to leave school, and can't learn it all at once on my own). Any help you can give me to get over this issue would be greatly appreciated. I am completely stumped. Please help! code.html
July 26, 201214 yr I am using Dreamweaver CS5 to design a website. I don't have a link, as it is only on my local testing server right now. I have attached my code. The built-in behaviors are killing me. I inserted nav items as rollover images. The rollovers work, but the link only seems to work in Firefox, not in Chrome when I am testing it. I know that it is better to hand-code than use built in behaviors. I am learning PHP, but am not yet up to learning JavaScript (I had to leave school, and can't learn it all at once on my own). Any help you can give me to get over this issue would be greatly appreciated. I am completely stumped. Please help! Need to see the CSS really, however I'm guessing the problem is with the OnMouseOver etc. Instead of using that, it's better to use the :hover function is CSS. For example <html> <head> <style type="text/css"> li { display:inline; } a { background:red; color:black; text-decoration:none; padding:10px; } li.home :hover { background:blue; } a:hover { text-decoration:none; background-color:yellow; } </style> </head> <body> <ul> <li class="home"><a href="#">Home</a></li> <li><a href="#">Another Link</a></li> <li><a href="#">Yet Another</a></li> <li><a href="#">Another?</a></li> <li><a href="#">ZZZZZZ</a></li> </ul> </body> </html> If you want a different background for each <li> use a different class for each. Edited July 26, 201214 yr by jpwd
July 26, 201214 yr I would use CSS instead of those really bad Dreamweaver behaviors! Example: HTML: <ul id="menu"> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Contact</a></li> </ul> CSS: ul#menu { list-style: none; margin: 0; padding: 0; } ul#menu li { float: left; } ul#menu li a { width: 160px; height: 25px text-indent: -999px; background: url('../image/background.jpg') top center no-repeat; } ul#menu li a:hover { background: url('../image/background.jpg') bottom center no-repeat; } The button background image will be 160px wide and 50px high, top half of image will be the normal state and bottom half will be hover state. Edited July 26, 201214 yr by CQ Website Design
July 30, 201214 yr Author I can't thank you guys enough. This gave me the couple of pieces of info (and the confidence) I needed to dump Dreamweaver. I'm starting my design again, hand-coding it. I think I can do this. If so - well, every design I do will be so much better.
July 30, 201214 yr I can't thank you guys enough. This gave me the couple of pieces of info (and the confidence) I needed to dump Dreamweaver. I'm starting my design again, hand-coding it. I think I can do this. If so - well, every design I do will be so much better. So happy to hear that. It's amazing what you can do with modern markup & CSS; you'll coding like a boss in no time.
Create an account or sign in to comment