Solved

unable to increase size of horizontal list item using css

Posted on 2008-10-02
3
314 Views
Last Modified: 2013-11-19
I'm trying to make these hover buttons side by side like in a horizontal menu but the buttons won't seem to get bigger even if I fix their height and width
.button li{

display: inline;

background-repeat: no-repeat;

}
 

.button li a{

background-color: #CCCCCC;

/*background-image: url(normal image path);*/

background-repeat: no-repeat;

width: 100px;

height: 50px;

}
 

.button li a:hover{

background: none;

}
 
 
 
 

<div align="center">

<ul class="button">

<li><a href="#test">My link</a></li>

<li><a href="#test">My link</a></li>

</ul>

</div>

Open in new window

0
Comment
Question by:MeridianManagement
3 Comments
 
LVL 5

Expert Comment

by:jericotolentino
ID: 22630996
I'm not really sure what you're trying to do, but you can try:

padding: 10px;

if it works for you.
0
 
LVL 2

Author Comment

by:MeridianManagement
ID: 22631041
I want to make horizontal hover buttons. Padding 10 doesn't work because it makes the LI bigger but the gray part where the links are still looks small.
0
 
LVL 1

Accepted Solution

by:
santoshrajan earned 500 total points
ID: 22631113
Set the width and height for 'li' css and remove it fro where it is now.
.button li{

display: inline;

background-repeat: no-repeat;

width: 100px;

height: 50px;

}

 

Open in new window

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now