Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

unable to increase size of horizontal list item using css

Posted on 2008-10-02
3
Medium Priority
?
332 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 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remaiā€¦
The viewer will learn how to dynamically set the form action using jQuery.
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)
Suggested Courses

772 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