Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Having problem gettin menu to display with images
Old 11-18-2009, 11:06 PM Having problem gettin menu to display with images
Experienced Talker

Posts: 31
Name: Rachel
Trades: 0
I am making a list for a menu, I had the list looking fine with text, but when I inserted the image to replace the list text I now get a little icon instead of the picture when I look in IE. It works fine in firefox though, any ideas?

(edit-it happens to all my pictures in IE7)

Also how do I get the second menu that drops down to come out on the right instead of left, I had a play with the code but was unsuccessful.

Thanks...

HTML:

Quote:
<div>

<ul class="nav">

<h3>
<li><img src="home.jpg" /> </li>
<li><img src="about me.jpg" /> </li>

<li><img src="portraits.jpg" />
<ul>
<li>Special Occasion</li>
<li>Family</li>
<li>Senior</li>
<li>Couple</li>
</ul>
</li>
<li><img src="pets.jpg" />
<ul>
<li>another navigation list item</li>
<li>...</li>
<li>...</li>
<li>...</li>
</ul>
</li>

</ul>
</div>
and the following CSS

Quote:
/*** Nav bar styles ***/

ul.nav,
.nav ul{
/*Remove all spacings from the list items*/
margin: 0;
padding: 0;
cursor: default;
list-style-type: none;
}

ul.nav{
width: 20ex;
/*Optional, to make the navigation bar positions on the left of the content*/
float: center;
margin-right: 1em;
}

ul.nav>li{
margin: 0;
padding: 2px 6px;
}

ul.nav li>ul{
/*Make the sub list items invisible*/
display: none;
position: absolute;
width: 20ex;
left: 20ex;
margin-top: -1.4em;
margin-left: 9px;
}

ul.nav li:hover>ul{
/*When hovered, make them appear*/
display : block;
}

.nav ul li a{
/*Make the hyperlinks as a block element, sort of a hover effect*/
display: block;
padding: 2px 10px;
}

/*** Menu styles (customizable) ***/

ul.nav,
.nav ul,
.nav ul li a{
background-image: url(1.jpg);
color: #000;
}

ul.nav li:hover,
.nav ul li a:hover{
background-color: #484848;
color: #fff;
}

ul.nav li:active,
.nav ul li a:active{
background-color: #036;
color: #fff;
}

.nav ul{
border: 1px solid #000;
}

.nav a{
text-decoration: none;
}

h3 {color: #000;}
__________________

Please login or register to view this content. Registration is FREE
that I am building for my self, any tips and tricks appreciated.

Last edited by Rachelsne; 11-19-2009 at 12:11 AM..
Rachelsne is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-19-2009, 03:58 PM Re: Having problem gettin menu to display with images
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
If that is your code, then you need to get rid of the <h3> inside the list - the code you're showing put the list INSIDE the <h3>, which is unclosed, but that's invalid. You can put an <hx> tag inside a list, but it has to be inside the <li>, like this:

<li><h3>xxxx</h3></li>

There is no such thing as float:center

Is the link in your sig the site you're working on ?
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Having problem gettin menu to display with images
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.77258 seconds with 12 queries