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.

CSS Forum


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



Reply
horizontal list rather than vertical?
Old 09-02-2009, 04:51 AM horizontal list rather than vertical?
Ultra Talker

Posts: 316
Trades: 0
I am trying to make a link menu but the list items are stacking up vertically rather than horizontally.

Can anyone see anything wrong? The list is being used in a Wordpress post.

HTML Code:
<div class="image-holder">
<div class="image"><img src="http://ecx.images-amazon.com/images/I/41XZTVKkN6L._SL500_AA280_.jpg" width=200 ></div>
<ul><li><a href="#">one</a></li><li><a href="#">two</a></li></ul>
</div>
Code:
}
.image-holder {
    float:right;
    width:202px;
    height:242px;
    position:relative;
    padding-left:5px;
}
.image-holder ul {
    text-align: center;
    float: left;
    list-style: none;
    padding: 0px;
    margin: 1px;
    border: 1px solid #000000;
    width: 90px;
    font-weight:bold;
    display:block;
}
.image-holder ul a {
    text-align: center;
    color:#000000;
    text-decoration:none;
    background-color:#96D2F3;
    display:block;
    }
.image-holder  ul a:hover {
    text-align: center;
    color:#000000;
    text-decoration:none;
    background-color:#00FF00;
    display:block;
    }
.image {
    float:right;
    border:#999999 1px solid;
    width:200px;
    height:200px;
    position:relative;
    }
Many thanks.
Joe3000 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-02-2009, 11:33 AM Re: horizontal list rather than vertical?
racer x's Avatar
Ultra Talker

Posts: 457
Name: Randy
Location: Northern Wisconsin
Trades: 0
display:block; means that something will act like a block level element and be stacked like a <div> or a <p>.

You have <ul> floated left but that does not make its' <li>'s float left.

You have neither floated the list items nor used displayed "inline" so the default is stacked.

I suggest you look here and find the menu you want to achieve:
http://css.maxdesign.com.au/listutorial/
racer x is offline
Reply With Quote
View Public Profile Visit racer x's homepage!
 
Reply     « Reply to horizontal list rather than vertical?
 

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.17011 seconds with 12 queries