Any pointers on where I'm going wrong would be much appreciated.
<input id="Fiction" value="Fiction" onclick="location.href='/entertainment/booktester/fiction';style.background='#A70000'" style="width: 75px; height: 32px" type="button" />
Note that your href= value is not the current directory, but starts at the root.
<meta charset="UTF-8" />
width: 75px; height: 32px;
<title> Untitled </title>
<input id="Fiction" value="Fiction" onclick="location.href='/entertainment/booktester/fiction'" type="button" />
Don't know if that is a mistake or not since I'm just copying your post.
That's just what I was trying to do! Many thanks for your help - didn't realise CSS could be put in a block like that outside a stylesheet. So much to learn...
You are most welcome.
Happy to help.
Note: If you have multiple buttons, you could create a class instead of using the ID.
Users Browsing this Thread
There are currently 2 users browsing this thread. (0 members and 2 guests)
Tags for this Thread