•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 363,516 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,415 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 9167 | Replies: 34
![]() |
•
•
Join Date: Aug 2004
Posts: 22
Reputation:
Rep Power: 4
Solved Threads: 0
Why is the tag coded as follows:
Instead of this:
background: #ffffff url(background_norm.jpg) left no-repeat;
Instead of this:
background: #ffffff; url("background_norm.jpg"); left no-repeat; looks like a typo actually. the ";" tells the computer it's the end of the line, so in that case anything after the basic color would be ignored.
you can use them if you want to, but you don't need them. However if you're using inline styles (i.e. <span style="..."> then you shouldn't use a double quote around the filename or the computer may get confused and think it's reached the end of the style tag.
•
•
Join Date: Aug 2004
Posts: 22
Reputation:
Rep Power: 4
Solved Threads: 0
All gummed up....
This is not working. Can you see why?
This is not working. Can you see why?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>menu..</title>
<STYLE type="text/css">
.menu a {
background: #ffffff url(images/btn_default.gif) left no-repeat;
DISPLAY: block;
}
.menu a:hover {
background: #ffffff url(images/btn_hot.gif) left no-repeat;
DISPLAY: block;
}
.menu a:active {
background: #ffffff url(images/btn_default.gif) left no-repeat;
DISPLAY: block;
}
</STYLE>
</head>
<body>
<a>Home</a>
</body>
</html> yes
Note the div around the a.
Also
this means it only applys to "a" elements within an element with a class of menu. Otherwise every single link on the page would have the images in the background...
Does that help?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>menu..</title>
<STYLE type="text/css">
.menu a {
background: #ffffff url(images/btn_default.gif) left no-repeat;
DISPLAY: block;
}
.menu a:hover {
background: #ffffff url(images/btn_hot.gif) left no-repeat;
DISPLAY: block;
}
.menu a:active {
background: #ffffff url(images/btn_default.gif) left no-repeat;
DISPLAY: block;
}
</STYLE>
</head>
<body>
<div class="menu"><a>Home</a></div>
</body>
</html>Also
•
•
•
•
.menu a {
}
Does that help?
zip your folder and send it to me.
my first thoughts include:
dimensions on the hyperlinks.
image paths?
my first thoughts include:
dimensions on the hyperlinks.
image paths?
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
- dynamic menu using ruby (Ruby)
Other Threads in the HTML and CSS Forum
- Previous Thread: Layout in CSS
- Next Thread: using animated footage in a web site


Linear Mode