logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Dreamweaver General
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 07-01-2006, 03:39 PM   #1
RobG
 
Join Date: May 2006
Posts: 10
Default A simple a:hover question.

Hi,

I am trying to build a simple navigation list, and I want it so that the background colour for the block containing the ul item is changed on hover. I am almost there, but the block of colour is offset and I can't seem to get it lined up within the background image I am using for the containing div.

I have uploaded the page to:

http://www.csstest.pwp.blueyonder.co.uk/menu.html

Here is the HTML:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Menu Demo</title>

<style type="text/css">

div#menu1 {width:240px; height:340px; background-image:url(200x300.jpg); font-family:Verdana, Arial, Helvetica, sans-serif; background-repeat:no-repeat;}

div#menu1 ul {list-style-type:none; padding-top:20px; list-style-position:inside;  }

div#menu1 li {height:45px; width:200px; margin: 0; list-style:none;}

div#menu1 a {text-decoration:none; color:#CCCCCC;  font-size:14pt; display: block;  }

div#menu1 a:link { color:#CCCCCC; }

div#menu1 a:visited {color:#999999; }

div#menu1 a:hover { background-color:#CCCCCC; color:#333333; text-decoration : underline; }

</style>

</head>

<body>

<div id="menu1">
<ul>
	[*] Link 1
	[*] Link 2
	[*] Link 3
	[*] Link 4
	[*] Link 5
	[*] Link 6[/list]<div>

</body>
</html>
If someone could help me with this, I would greatly appreciate it.

Thanks

Rob
RobG is offline   Reply With Quote
Old 07-02-2006, 11:49 AM   #2
RobG
 
Join Date: May 2006
Posts: 10
Default

Hi,

I have now found the answer to this. I needed to add the code:

Code:
display:inline;
to the div#menu ul selector in the CSS.

Cheers

Rob
RobG is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:51 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com