473,698 Members | 2,152 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Fixed width for <li>

I haven't been able to define a fixed width (well, I chose a 20% width)
for the li element used in the navigation menu:
http://www.auriance.com/docs/auriance/
Style sheet here:
http://www.auriance.com/docs/auriance/css/main.css
Is there a way to have all links be the same width (20%)?
Thanks,

--

Kerberos.

http://www.opera.com
http://www.freebsd.org
http://www.auriance.com
http://www.osresources.com
http://exodus.jabberstudio.org
Jul 21 '05 #1
4 11710
Hi,
I haven't been able to define a fixed width (well, I chose a 20% width)
Is there a way to have all links be the same width (20%)?

Yes, try to set the <li>s block and float:left.

Chris
Jul 21 '05 #2
Em Tue, 28 Dec 2004 08:37:50 +0100, Chris Leipold <cl******@dietz k.de>
escreveu:
Hi,
I haven't been able to define a fixed width (well, I chose a 20%
width) Is there a way to have all links be the same width (20%)?

Yes, try to set the <li>s block and float:left.

Chris


Thanks Chris, it worked as expected. The only problem now is that the "a"
tag doesn't extend to the right margin of each little link boxes when I
hover over the links - The red background doesn't extend to the right
margin.
How could I do this? (Sorry, I'm still learning!)
Thank you.

--

Kerberos.

http://www.opera.com
http://www.freebsd.org
http://www.auriance.com
http://www.osresources.com
http://exodus.jabberstudio.org
Jul 21 '05 #3
Em Tue, 28 Dec 2004 17:26:33 -0200, Kerberos <me@privacy.net > escreveu:
Em Tue, 28 Dec 2004 08:37:50 +0100, Chris Leipold <cl******@dietz k.de>
escreveu:
Hi,
I haven't been able to define a fixed width (well, I chose a 20%
width) Is there a way to have all links be the same width (20%)?

Yes, try to set the <li>s block and float:left.

Chris


Thanks Chris, it worked as expected. The only problem now is that the
"a" tag doesn't extend to the right margin of each little link boxes
when I hover over the links - The red background doesn't extend to the
right margin.
How could I do this? (Sorry, I'm still learning!)
Thank you.


I found what the problem was, I forgot to set the "a" tag to be displayed
as a block.
Looks good now ;)

--

Kerberos.

http://www.opera.com
http://www.freebsd.org
http://www.auriance.com
http://www.osresources.com
http://exodus.jabberstudio.org
Jul 21 '05 #4
Hi,
[...]
How could I do this? (Sorry, I'm still learning!) We're all learning ;-)
Thank you.

De rien.

Chris
Jul 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
69389
by: Timo Nentwig | last post by:
Hi! li { display: inline; } <li>foo bar</li> <li>blah</li>
8
6882
by: Michael | last post by:
This is a two-part question to which I haven't been able to find an answer anywhere else. 1. Is it possible to format the bullet/number character of the <li>? In my styles sheet, I have the <li> tag formatted, for example, bold. However, when it's applied, the number of the <li> is not bold, but the text is. Do I have to apply the bold to the <ol> instead? 2. When I use <li>example text</li>, and when I insert a <br> after the </li>,...
4
2208
by: abs | last post by:
Anybody has an idea how to get the <ul> element which is not nested in <li> element ? In other words I have several lists like this: <ul id="1"> <li>Aaaaaaaa</li> <li>Bbbbbbbb</li> <li>Cccccccc <ul> <li>111111</li> <li>222222</li>
2
7629
by: Shaun | last post by:
Hello! I have a quick question regarding CSS and having it applied to all elements. I am trying to eliminate the gap between a paragraph and a list that usually occurs in html and I've found away to do that with this code: <p>a</p> <ul style="margin-top: -20; padding-top: 0"> <li>1</li>
2
2570
by: Andrew Donaldson | last post by:
I'd welcome some help in understanding what's going on with graphical browsers in the navigation list at: http://www.bounceandtickle.org.uk/index.html (This site is not about what it might seem from the URL!) I'm using a <ul> for the gimmicky teddy bear links. The teddy is a background image for each <li>. Each link 'button' is an <a> within an <li>, and I'm trying to get the button to appear partway down the teddy
1
3149
by: skijor | last post by:
I have created a vanilla drop-down menu and want the width of the sub-menu elements to be as wide as the widest element in the drop-down. This would make each flush on the right border. It works in Firefox but in IE I see two strange things. 1st: the width of the first drop-down is as wide as the entire menu bar. 2nd: the elements of the remaining drop-down menus have widths of 'auto'; div#listmenu ul li ul li { width: 100%;
2
5965
by: mike_newsgroups | last post by:
Hello everyone, Anyone know how can I change the 30px below to a different value from a javascript function? <table> <tr> <td> <div id="star-rating"> <ul>
10
6250
by: BobaBird | last post by:
When <liis set to {max-width:45em;}, the bullets move from the top to the bottom of the <li>. Also, the bullet for a top-level <liends up on the same line as the last <liof its nested list, with both disc and circle bullets on that line. The problem is in IE7. The page displays as expected in FF 2.0.0.9. Is there a way to make IE7 behave? See http://ekb.dbstalk.com/sandbox/bulletalign.htm --
2
5600
dlite922
by: dlite922 | last post by:
Before you baulk at yet another min-width problem, hear me out. I've been googling for a good hour now and experimenting but at no avail. I have a horizontal UL/LI menu and I want the li width to be at least a certain amount (say 100px) but also extend if the text is longer than that. Observe: that being said, I don't know how to implement the various solutions (CSS only, I do not want a JS solution) such as this one:
0
8676
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8608
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8870
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6524
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3051
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2006
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.