Jump to content


My list menu


4 replies to this topic

#1 piraten2k

    Young Padawan

  • Members
  • Pip
  • 23 posts

Posted 18 August 2005 - 07:08 AM

I have done a menulist in CSS with a tutorial as help.

Now I want it to be vertical if it's possible.

:Link: MENU


:CSS CODE:
/* CSS Document */

#menu2 {display:block; height:120px; min-height:120px;}
#menu2 ul {margin:0; padding:0; list-style-type:none;}
#menu2 li {display:block; float:right; margin-right:1px; width:115px; border:1px solid #000;}
#menu2 li.list1t {background:#000 url(1.gif) no-repeat;}
#menu2 li.list2t {background:#000 url(1.gif) no-repeat;}
#menu2 li.list3t {background:#000 url(1.gif) no-repeat;}
#menu2 li.list4t {background:#000 url(1.gif) no-repeat;}
#menu2 a {display:block; width:115px; padding-top:86px; color:#000; text-decoration:none; text-align:center; text-transform:uppercase; color:#fff; font-size:0.8em; font-weight:bold;}

#menu2 a#item1 {background:transparent url(1.gif) -11px -8px no-repeat;}
#menu2 a#item2 {background:transparent url(1.gif) -115px -86px no-repeat;}
#menu2 a#item3 {background:transparent url(1.gif) -115px -86px no-repeat;}
#menu2 a#item4 {background:transparent url(1.gif) -115px -86px no-repeat;}

#menu2 a#item1:hover {background-position:top right; z-index:50; color:#fc0;}
#menu2 a#item2:hover {background-position:top right; z-index:50; color:#0c0;}
#menu2 a#item3:hover {background-position:top right; z-index:50; color:#f00;}
#menu2 a#item4:hover {background-position:top right; z-index:50; color:#0ff;}


:HTML CODE:
<div id="menu2">
<ul>
<li class="list1t"><a id="item1t" href="#nogo" title="Item 1">Item 1</a></li>
<li class="list2t"><a id="item2t" href="#nogo" title="Item 2">Item 2</a></li>
<li class="list3t"><a id="item3t" href="#nogo" title="Item 3">Item 3</a></li>
<li class="list4t"><a id="item4t" href="#nogo" title="Item 4">Item 4</a></li>
</ul>
</div>

Anyone who know what to edit in the CSS code so my listmenu goes vertical instead of horizental?

:P

#2 Jaymz

    Retired P2L Staff

  • Members
  • PipPipPipPip
  • 4,104 posts

Posted 18 August 2005 - 08:16 AM

li { display: inline; }


#3 coolaid

    P2L Jedi Master

  • Members
  • PipPipPipPip
  • 1,435 posts
  • Gender:Male
  • Interests:i wonder..

Posted 18 August 2005 - 04:39 PM

its more convenient to use

display:block;
float:left;

so that way you can still add a width to the list item

#4 piraten2k

    Young Padawan

  • Members
  • Pip
  • 23 posts

Posted 23 August 2005 - 08:22 AM

coolaid, on Aug 18 2005, 09:39 PM, said:

its more convenient to use

display:block;
float:left;

so that way you can still add a width to the list item
Really thx dude!

#5 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 23 August 2005 - 10:33 AM

you could also just fix the CSS, rather then add more to it
/* CSS Document */

#menu2 {display:block; height:120px; min-height:120px;}
#menu2 ul {margin:0; padding:0; }
That's your first 4 lines of code, i just took list-style-type out of #menu2 ul





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users