Click to See Complete Forum and Search --> : How do I get this <ul> to stack the buttons?


chausfeld
01-12-2010, 09:56 AM
I'm trying to get these CSS buttons into a CSS list, but they aren't stacking vertically and I can't seem to remove the bullet (at least, not on FF). Any insight as to how I can get these to appear top to bottom?

http://www.concrete-creative.com/buttons/buttons_list.html

the HTML:

<div>
<ul class-"buttons">
<li class="button1"><a href="#"><span>Gray Buttons</span></a></li>
<li class="button6"><a href="#"><span>Orange Button</span></a></li>
</ul>
</div>



the CSS:

ul.buttons {
list-style-type: none
}

/* GRAY BUTTON */
li.button1 a {
background: transparent url('images/gray_ends.png') no-repeat scroll top right;
font-family: Helvetica, Verdana, Arial, sans-serif;
color: #000000;
display: block;
float: left;
font: normal 11px arial, sans-serif;
height: 22px;
margin-right: 6px;
padding-right: 8px; /* sliding doors padding */
text-decoration: none;
}
li.button1 a span {
background: transparent url('images/gray_body.png') no-repeat;
display: block;
line-height: 12px;
padding: 5px 0 5px 8px;
}
li.button1 a:hover {
background-position: bottom right;
color: #000;
outline: none; /* hide dotted outline in Firefox */
}
li.button1 a:hover span {
background-position: bottom left;
}

then same CSS for orange button - button6

middo1985
01-12-2010, 10:16 AM
Remove Float:left to get them vertical. Not sure about bullets just at the minute.

/* GRAY BUTTON */
li.button1 a {
background: transparent url('images/gray_ends.png') no-repeat scroll top right;
font-family: Helvetica, Verdana, Arial, sans-serif;
color: #000000;
display: block;
float: left;REMOVE THIS
font: normal 11px arial, sans-serif;
height: 22px;
margin-right: 6px;
padding-right: 8px; /* sliding doors padding */
text-decoration: none;

middo1985
01-12-2010, 10:26 AM
you have a typo ul class-"buttons" needs to be ul class="buttons"

chausfeld
01-12-2010, 10:37 AM
thanks for noticing that. bullets are gone, but still aren't stacking.

skywalker2208
01-12-2010, 10:39 AM
You need to take float: left off for both buttons.

chausfeld
01-12-2010, 10:47 AM
I think I figured it out - clear: left. thanks!

middo1985
01-12-2010, 10:57 AM
hey, it was just nice to HELP rather than always being the one asking :D