Putting navigation list on top of background image

This is a discussion on "Putting navigation list on top of background image" within the Web Page Design section. This forum, and the thread "Putting navigation list on top of background image are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 15th, 2007, 22:14
Junior Member
Join Date: May 2007
Location: Virginia
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Putting navigation list on top of background image

I'm converting my table layout to all CSS, and have run into a problem getting my navigation list to go on top of a background image.

It currently looks like this:

http://img146.imageshack.us/img146/816/nav1xi3.jpg

I need it to look like this:

http://img146.imageshack.us/img146/2690/nav2sh8.jpg

The HTML:

Code: Select all
 
<div id="navigation">
     <img src="images/global/index_03.gif" width="800" height="25" /> 
        <ul>
         <li class="last"><a href="contact.html">Contact</a></li>
         <li><a href="thearts.html">The Arts</a></li>    
         <li><a href="forum.html">Forum</a></li>
         etc.
       </ul>       
    </div>
The CSS:
Code: Select all
 
#navigation {
 margin: 0;
 padding-top: 0;
 padding-right: 49px;
 padding-bottom: 0;
 padding-left: 0;
 background-repeat: no-repeat;
 background-image: url(images/global/index_03.gif); 
 }
 
#navigation ul {
 list-style: none;
 margin: 0;
 padding: 0; 
}
 
#navigation ul li {
 margin: 0;
 padding: 0;
 display: inline;
 float: right;
}
 
#navigation ul li a {
 text-transform: uppercase;
 padding: 0 10px;
 border-right: 1px solid #fff;
 color: #fff;
 font-family: Arial, Helvetica, sans-serif;
 font-size: 11px;
 text-decoration: none;
 font-weight: bold;
}
Reply With Quote

  #2 (permalink)  
Old Sep 15th, 2007, 22:21
SuperMember

SuperMember
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Putting navigation list on top of background image

Er...

Why do you have an <img> with the same image as you are using for a CSS background?

The point of a CSS background is that you don't need the <img>.
Reply With Quote
  #3 (permalink)  
Old Sep 16th, 2007, 00:47
Junior Member
Join Date: May 2007
Location: Virginia
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Putting navigation list on top of background image

Quote:
Originally Posted by MikeHopley View Post
Er...

Why do you have an <img> with the same image as you are using for a CSS background?

The point of a CSS background is that you don't need the <img>.
I asked myself that same question, but when I removed the img from the HTML (but kept it in the CSS), it disappeared completely in Design view.
Reply With Quote
  #4 (permalink)  
Old Sep 16th, 2007, 03:00
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,770
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: Putting navigation list on top of background image

Quote:
Originally Posted by Kurt View Post
I asked myself that same question, but when I removed the img from the HTML (but kept it in the CSS), it disappeared completely in Design view.
Just in design view?
what about in your browser?
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #5 (permalink)  
Old Sep 16th, 2007, 04:08
Junior Member
Join Date: May 2007
Location: Virginia
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Putting navigation list on top of background image

Quote:
Originally Posted by alexgeek View Post
Just in design view?
what about in your browser?
Got it working - I specified the height and width of the background .gif as part of the CSS rule and it's now showing.

Last edited by Kurt; Sep 16th, 2007 at 05:37.
Reply With Quote
  #6 (permalink)  
Old Sep 16th, 2007, 07:19
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,649
Thanks: 0
Thanked 8 Times in 8 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
Re: Putting navigation list on top of background image

Yes, i was about to say that. When you have a BG in CSS you need to set widths and heights to make it visible.
Reply With Quote
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Putting Layers in the background Rick Web Page Design 1 May 16th, 2008 22:30
Using a list for navigation, can you center a list? tonyb Web Page Design 4 May 9th, 2008 16:26
List-O-Matic Navigation Creator Jack Franklin Web Page Design 4 Dec 22nd, 2007 12:37
Unordered list under background image AdRock Web Page Design 4 Aug 7th, 2006 12:43
List style / rollover image navigation disappears in IE on the Mac eskymo Web Page Design 5 Mar 1st, 2006 00:43


All times are GMT. The time now is 16:06.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43