Open Source Tutorials - Open Source Training
Open source training & tutorials from experienced, passionate people
chrome icon firefox icon ie icon opera icon safari icon Sings in these Browsers
A- A A+

By A Web Design

Welcome, Guest
Username Password: Remember me

How to make all li to be sized the same.
(1 viewing) (1) Guest
All your queries regarding CSS will be solved in this forum
  • Page:
  • 1
TOPIC:

How to make all li to be sized the same.

How to make all li to be sized the same. 9 months, 3 weeks ago #766

  • shailesh
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
I am creating horizontal list. When i use <ul>, it appears horizontally but the width and height become no more than the size of the text inside! This can be changed with padding but I need all <li> to be sized the same.

<s-tyle>
li
{
display: inline;
width:50px;
height:50px;
padding: 0px;
margin: 0px;
list-style-type: none;
}
</style>

Re: How to make all li to be sized the same. 9 months, 3 weeks ago #768

  • gillian
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
Add display:block; and float:left in the styling

li
{
display:block;
width:50px;
height:50px;
list-style-type: none;
padding: 0px;
margin: 0px;
float:left;
}
  • Page:
  • 1
Time to create page: 2.07 seconds
OSV Newsletter


Receive HTML?

NOTE: To prevent subscription to the OSV newsletter, uncheck the checkbox above.
Guest Blog for OSV
Free Ebook Download