We help IT Professionals succeed at work.

Dreamweaver: Change background image of spry menu bar

adimit19
adimit19 asked
on
I want to add a background image to the main spry menu. I have the following .CSS code that does not work:

ul.MenuBarHorizontal
{
      margin: 0;
      padding: 0;
      list-style-type: none;
      font-size: 100%;
      cursor: default;
      width: auto;
      background-image: url(../images/buttons/Button_Normal.png) no-repeat;
}
Comment
Watch Question

LZ1
Top Expert 2011
Commented:
Can you post a live link?
Commented:
unfortunately not at this point. Is there anything else I can do to help?
LZ1
Top Expert 2011
Commented:
How about the rendered HTML and CSS?
Commented:
Just a couple thoughts I have from what you are able to share:

Try deleting "width:auto;" or adding a hard value in there and see if that shows your image.

if not, try deleting the "../" before images/buttons/Button_Normal.png. That is forcing your MenuBarHorizontal to start looking for the image 1 directory above the style sheet.
LZ1
Top Expert 2011
Commented:
Just to add to Jen0910's remark: You may also need to add a height or float:left as well.
Anuradha GoliSystems Development / Support Specialist
Commented:
Based on the scenario you explained, I understand that the background image for ul tag is not appearing
ul tag with no content doesn't display background image
<ul class="MenuBarHorizontal">content</ul>

Open in new window

Commented:
the background color was placed under ul.MenuBarHorizontal a. That seemd to solve it

Author

Commented:
it worked.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.