473,414 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

CSS menu background won't show up

I've been trying to create a new navigation system for my site, and I got everything figured out except for one thing. Here is the CSS code I'm using right now:

Expand|Select|Wrap|Line Numbers
  1. body {
  2.     font: normal 10px Verdana, Arial, Helvetica, sans-serif;
  3.     color: #000000;
  4.     background: #FFFFFF;
  5.     height: auto;
  6.     width: auto;
  7.     margin: 0px;
  8.     padding: 0px;
  9. }
  10. #wrapper {
  11.     text-align: left;
  12.     width: 100%;
  13.     margin-right: auto;
  14.     margin-left: auto;
  15. }
  16.  
  17. a { color: #0000FF; text-decoration: none; }
  18. a:hover { color: #000000; }
  19. a.redbar { color: #FFFF00; text-decoration: none; }
  20. a.redbar:hover { color: #000000; }
  21.  
  22. table {
  23.     border-width: 0px;
  24.     border-style: none;
  25.     margin: 0px;
  26.     padding: 0px;
  27.     font: 10px Verdana, Arial, Helvetica, sans-serif;
  28.     color: #000000;
  29.     background-color: #FFFFFF;
  30. }
  31.  
  32. .loading {
  33.     font-size: 24px;
  34.     font-style: italic;
  35.     font-weight: bold;
  36.     color: #FFFFFF;
  37.     text-align: right;
  38.  
  39. }
  40.  
  41. .bars {
  42.     font-size: 10px;
  43.     font-style: italic;
  44.     font-weight: bold;
  45.     color: #FFFFFF;
  46.  
  47.  
  48. }
  49.  
  50. .bars, .loading {
  51.     background-color: #0033CC;
  52.  
  53.     }
  54.  
  55.  
  56. #navbar {
  57.     font: bold 12px Geneva, Arial, Helvetica, sans-serif;
  58.     text-transform: uppercase;
  59.     text-align: center;
  60.     border-top: 1px solid #000000;
  61.     border-bottom: 1px solid #333333;
  62.     clear: both;
  63.     margin-bottom: 10px;
  64. }
  65. #navbar ul {
  66.     margin: 0px;
  67.     padding: 0px;
  68. }
  69. #navbar li {
  70.     list-style: none;
  71.     display: inline;
  72. }
  73. #navbar a {
  74.     background: url(../images/blackslant_15x15.gif);
  75. }
and here is my unordered list that I am using that is using the #navbar property:

Expand|Select|Wrap|Line Numbers
  1. <div id="navbar">
  2.           <ul>
  3.             <li> <a href="news/index.html">News</a></li>
  4.             <li> <a href="fanfiction/index.html">Fanfiction</a></li>
  5.             <li> <a href="thoughts/index.html">Thoughts</a></li>
  6.             <li> <a href="links/index.html">Links</a></li>
  7.             <li> <a href="contact/index.html">Contact</a></li>
  8.           </ul>
  9.   </div>
The problem is when I actually add the background I want to use for this navigation, the background doesn't come up. I try to do different things to cause it to come up, but nothing shows up AT ALL in Dreamweaver 8. I've had various different things happen with Firefox and IE, with the background overflowing out of the navigation bar, it not being centered right, whatever they could've done to screw it up, they did. Now, the float:block property will get it to show, but since I need this navigation centered, I can't use float (the background itself is a little diagonal black line), and since I only need this BG in the actual list items, I can't tell it to use the background in the entire UL (there is supposed to be only one black line going in between each link). Be advised that I didn't use any padding because in order to start padding the background, I need to have it know that there actually IS a background being used.

I have tried to do everything imaginable in order to get this thing to look right and to actually get Dreamweaver and/or the page, css, whatever it is that is reading what, to reconize that I'm actually telling it to use a background in the code, in the way that I was wanting it. But I think I have hit my wits end in this, because everything that I have tried has done absolutly nothing with getting this problem fixed. I need help, PLEASE!!
Oct 7 '06 #1
2 2960
I won't pretend to have this post as a way to bump up this topic, because I REALLY NEED HELP ON THIS!!! I'm STILL trying to do ANYTHING I possibly can, and no one is answering (or caring?).

What am I doing wrong? PLEASE HELP!!
Oct 11 '06 #2
Hi darkpowrjd

I just think that maybe no-one is too sure exactly what's up! Your CSS seems fine so I can't see why your background shouldn't be showing up! As it is above, you should have your menu items with ///////////////// behind them.

You say 'there is supposed to be only one black line going in between each link' so I'm presuming you mean you want your menu like this:

Item 1 / Item 2 / Item 3 / Item 4

If so, then change your CSS from this:
Expand|Select|Wrap|Line Numbers
  1. #navbar li {
  2.     list-style: none;
  3.     display: inline;
  4. }
  5. #navbar a {
  6.     background: url(../images/blackslant_15x15.gif);
  7. }
to this:
Expand|Select|Wrap|Line Numbers
  1. #navbar li {
  2.     list-style: none;
  3.     display: inline;
  4.     padding-right: 15px;
  5.     background: url(../images/blackslant_15x15.gif) top right no-repeat;
  6. }
Hopefully I'm reading you right - if so then that should give you the result you want.

Jay
Oct 11 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: John Pote | last post by:
I have a menu bar in a top level window as follows menuBar = Menu(rootWin) menuBar.add_command( label='Quit', command=rootWin.quit) configMenu = Menu(menuBar, tearoff=0)...
4
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following...
1
by: ajay | last post by:
I have following code for a slide menu but i twiked it to work for a single level menu. Open it in a Browser to get a clear picture. I have 2 Qs 1) How to make first entry as non-link. i.e i...
4
by: Simon Birch | last post by:
Hi, I hope someone can help with this, it is driving me bonkers. After reading the Suckerfish Dropdown article on A List Apart, I decided to try and create a side menu based on the code I'd seen....
4
by: Yuk Cheng | last post by:
<<<start index.htm>>> <html> <head> <script> function perform(action){ } </script> </head>
1
by: proplady | last post by:
I've had this menu for some time, and periodically make changes. I've made some changes now (just some menu items), and the menu will not show up on my webpages. I know it's something simple,...
21
by: daydream | last post by:
yeah i need some help(such a common line) ,i have a menu and each link has its own div respectively and yeah obviously when u click the link the div shows, the problem is i would like each div to...
7
by: milestogofromhere | last post by:
It is late so this is probably something really obvious but I am not seeing it. Can someone please help? Here is the page in question: html - http://www.itsyourplate.com/index2.php css -...
2
by: dharmbhav | last post by:
Hello all, I am trying to develop a roll-over menu effect on a page. It works fine with all other browsers except IE6. Can some one please help me? HTML: <div class="menu-item-wrap">...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.