473,702 Members | 2,462 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

width of bottom-border?

By width, I don't mean weight. I have a row of <li>'s, with a
bottom-border. I want the bottom-border to only go 90% of the <li>
(centered)

Is there any way to do this?

I have it in this format:

CSS:
li {
border-bottom: 1px solid #00ff00;
}
HTML:
<ul>
<li>this</li>
<li>that</li>
<li>the other</li>
<li>bleh</li>
</ul>

Oct 31 '06 #1
16 3280


On Oct 30, 4:18 pm, "FuzzyLogik " <taw...@gmail.c omwrote:
By width, I don't mean weight. I have a row of <li>'s, with a
bottom-border. I want the bottom-border to only go 90% of the <li>
(centered)

Is there any way to do this?

I have it in this format:

CSS:
li {
border-bottom: 1px solid #00ff00;

}HTML:
<ul>
<li>this</li>
<li>that</li>
<li>the other</li>
<li>bleh</li>
</ul>
!Also!

On the same list, when I have items rollover, it's not padding out like
the first line, e.g.:
|---This is a list item----|
|---This is a list item----|
|---This is a list item----|
|---This is a list item----|
|---This is a longer-------|
|List item-------------------|

I want it all to be padded out 6px.

Oct 31 '06 #2
In article
<11************ *********@i42g2 000cwa.googlegr oups.com>,
"FuzzyLogik " <ta****@gmail.c omwrote:

is it not time for you to post a url?

--
dorayme
Oct 31 '06 #3

dorayme wrote:
In article
<11************ *********@i42g2 000cwa.googlegr oups.com>,
"FuzzyLogik " <ta****@gmail.c omwrote:

is it not time for you to post a url?

--
dorayme
http://www.phazm.net/csstest/list01.html

Well, I don't know what I was doing wrong at work, but now the one that
wraps around is being padded correctly, so forget that :)

But I want the green bottom-border to NOT touch the blue border,
WITHOUT pushing the blue border out any more than 200px (which it's at
currently)

Oct 31 '06 #4
On 2006-10-31, FuzzyLogik <ta****@gmail.c omwrote:
>
dorayme wrote:
>In article
<11*********** **********@i42g 2000cwa.googleg roups.com>,
"FuzzyLogik " <ta****@gmail.c omwrote:

is it not time for you to post a url?

--
dorayme

http://www.phazm.net/csstest/list01.html

Well, I don't know what I was doing wrong at work, but now the one that
wraps around is being padded correctly, so forget that :)

But I want the green bottom-border to NOT touch the blue border,
WITHOUT pushing the blue border out any more than 200px (which it's at
currently)
Make the <lia bit narrower, and use margin instead of padding on the
left.

This works because padding goes inside the border, margin goes outside
it.

i.e. where you have

li {
padding-left:13px;
border-bottom:1px solid #33FF00;
width: 200px;
}

try

li {
/* padding-left:13px; */
margin-left: 13px;
border-bottom:1px solid #33FF00;
width: 174px;
}
Oct 31 '06 #5

Ben C wrote:
On 2006-10-31, FuzzyLogik <ta****@gmail.c omwrote:

dorayme wrote:
In article
<11************ *********@i42g2 000cwa.googlegr oups.com>,
"FuzzyLogik " <ta****@gmail.c omwrote:

is it not time for you to post a url?

--
dorayme
http://www.phazm.net/csstest/list01.html

Well, I don't know what I was doing wrong at work, but now the one that
wraps around is being padded correctly, so forget that :)

But I want the green bottom-border to NOT touch the blue border,
WITHOUT pushing the blue border out any more than 200px (which it's at
currently)

Make the <lia bit narrower, and use margin instead of padding on the
left.

This works because padding goes inside the border, margin goes outside
it.

i.e. where you have

li {
padding-left:13px;
border-bottom:1px solid #33FF00;
width: 200px;
}

try

li {
/* padding-left:13px; */
margin-left: 13px;
border-bottom:1px solid #33FF00;
width: 174px;
}

Great, thank you :)

Oct 31 '06 #6
Ben C wrote:
On 2006-10-31, FuzzyLogik <ta****@gmail.c omwrote:
>http://www.phazm.net/csstest/list01.html

Well, I don't know what I was doing wrong at work, but now the one
that wraps around is being padded correctly, so forget that :)

But I want the green bottom-border to NOT touch the blue border,
WITHOUT pushing the blue border out any more than 200px (which it's
at currently)

Make the <lia bit narrower, and use margin instead of padding on
the left.

This works because padding goes inside the border, margin goes
outside it.

i.e. where you have

li {
padding-left:13px;
border-bottom:1px solid #33FF00;
width: 200px;
}

try

li {
/* padding-left:13px; */
margin-left: 13px;
border-bottom:1px solid #33FF00;
width: 174px;
}
Perhaps this will be a bit better, allowing the centering Fuzzy
originally mentioned, and also scaling when a visitor resizes:

ul {
padding:0;
margin:0;
list-style-type:none;
width:20%; /* size to taste */
border:1px solid #3399FF;
}
li {
margin: 0 5%; /* <-- makes width of border-bottom 90% */
border-bottom:1px solid #33FF00;
text-align: center; /* <-- as originally requested */
}

--
-bts
-Motorcycles defy gravity; cars just suck
Oct 31 '06 #7


On Oct 31, 5:38 am, "Beauregard T. Shagnasty"
<a.nony.m...@ex ample.invalidwr ote:
Ben C wrote:
On 2006-10-31, FuzzyLogik <taw...@gmail.c omwrote:
>http://www.phazm.net/csstest/list01.html
Well, I don't know what I was doing wrong at work, but now the one
that wraps around is being padded correctly, so forget that :)
But I want the green bottom-border to NOT touch the blue border,
WITHOUT pushing the blue border out any more than 200px (which it's
at currently)
Make the <lia bit narrower, and use margin instead of padding on
the left.
This works because padding goes inside the border, margin goes
outside it.
i.e. where you have
li {
padding-left:13px;
border-bottom:1px solid #33FF00;
width: 200px;
}
try
li {
/* padding-left:13px; */
margin-left: 13px;
border-bottom:1px solid #33FF00;
width: 174px;
}Perhaps this will be a bit better, allowing the centering Fuzzy
originally mentioned, and also scaling when a visitor resizes:

ul {
padding:0;
margin:0;
list-style-type:none;
width:20%; /* size to taste */
border:1px solid #3399FF;}li {
margin: 0 5%; /* <-- makes width of border-bottom 90% */
border-bottom:1px solid #33FF00;
text-align: center; /* <-- as originally requested */

}--
-bts
-Motorcycles defy gravity; cars just suck

Ahh, now that I'm at work and see my code again, it becomes a bit more
complicated.

#nav {
width: 138px;
background-color: #FFF;
padding:1em 0 1em 0;
}

#nav ul {
list-style: none;
padding: 0 0 13px 0;
margin: 0 0 1em 0;
border: none;
background-color: #00FF00;
}

#nav li {
padding-left:6px;
margin: 0;
border-right: 1px solid #669fb7;
border-left: 1px solid #669fb7;
background-color: #F0F9FE;
border-bottom: 1px solid #C5D3DD;
}

So I can't actually adjust the size of the li, because that will make
the border on the left not align with the border on the top. (makes it
shallower)

Oct 31 '06 #8


On Oct 31, 7:14 am, "FuzzyLogik " <taw...@gmail.c omwrote:
On Oct 31, 5:38 am, "Beauregard T. Shagnasty"

<a.nony.m...@ex ample.invalidwr ote:
Ben C wrote:
On 2006-10-31, FuzzyLogik <taw...@gmail.c omwrote:
>>http://www.phazm.net/csstest/list01.html
>Well, I don't know what I was doing wrong at work, but now the one
>that wraps around is being padded correctly, so forget that :)
>But I want the green bottom-border to NOT touch the blue border,
>WITHOUT pushing the blue border out any more than 200px (which it's
>at currently)
Make the <lia bit narrower, and use margin instead of padding on
the left.
This works because padding goes inside the border, margin goes
outside it.
i.e. where you have
li {
padding-left:13px;
border-bottom:1px solid #33FF00;
width: 200px;
}
try
li {
/* padding-left:13px; */
margin-left: 13px;
border-bottom:1px solid #33FF00;
width: 174px;
}Perhaps this will be a bit better, allowing the centering Fuzzy
originally mentioned, and also scaling when a visitor resizes:
ul {
padding:0;
margin:0;
list-style-type:none;
width:20%; /* size to taste */
border:1px solid #3399FF;}li {
margin: 0 5%; /* <-- makes width of border-bottom 90% */
border-bottom:1px solid #33FF00;
text-align: center; /* <-- as originally requested */
}--
-bts
-Motorcycles defy gravity; cars just suckAhh, now that I'm at work and see my code again, it becomes a bit more
complicated.

#nav {
width: 138px;
background-color: #FFF;
padding:1em 0 1em 0;

}#nav ul {
list-style: none;
padding: 0 0 13px 0;
margin: 0 0 1em 0;
border: none;
background-color: #00FF00;

}#nav li {
padding-left:6px;
margin: 0;
border-right: 1px solid #669fb7;
border-left: 1px solid #669fb7;
background-color: #F0F9FE;
border-bottom: 1px solid #C5D3DD;

}So I can't actually adjust the size of the li, because that will make
the border on the left not align with the border on the top. (makes it
shallower)
That was confusing, here's an html file:

http://www.phazm.net/csstest/list1b.html

Oct 31 '06 #9
On 2006-10-31, FuzzyLogik <ta****@gmail.c omwrote:
[snip]
li {
padding-left:13px;
border-bottom:1px solid #33FF00;
width: 200px;
}
try
li {
/* padding-left:13px; */
margin-left: 13px;
border-bottom:1px solid #33FF00;
width: 174px;
}Perhaps this will be a bit better, allowing the centering Fuzzy
originally mentioned, and also scaling when a visitor resizes:

ul {
padding:0;
margin:0;
list-style-type:none;
width:20%; /* size to taste */
border:1px solid #3399FF;}li {
margin: 0 5%; /* <-- makes width of border-bottom 90% */
border-bottom:1px solid #33FF00;
text-align: center; /* <-- as originally requested */
[snip]
Ahh, now that I'm at work and see my code again, it becomes a bit more
complicated.

#nav {
width: 138px;
background-color: #FFF;
padding:1em 0 1em 0;
}

#nav ul {
list-style: none;
padding: 0 0 13px 0;
margin: 0 0 1em 0;
border: none;
background-color: #00FF00;
}

#nav li {
padding-left:6px;
margin: 0;
border-right: 1px solid #669fb7;
border-left: 1px solid #669fb7;
background-color: #F0F9FE;
border-bottom: 1px solid #C5D3DD;
}

So I can't actually adjust the size of the li, because that will make
the border on the left not align with the border on the top. (makes it
shallower)
Sorry, don't understand. What border on the top? The li has no top
border.
Oct 31 '06 #10

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

Similar topics

1
13956
by: Glabbeek | last post by:
I'm changing the layout of my site. Instead of using tables, I will use DIVs. It's working fine, except for 1 thing: In IE6 some DIVs are not the correct width. Mozilla and Opera are showing the page the way I want. Does anybody know a solution for this? First of all, the code I am using: CSS ------- body {
2
4472
by: Tristan Miller | last post by:
Greetings. I have a two-column web layout, where the first column is just the regular body text with a "marign-right" of 16em, and the second column is an "absolute"-positioned div with a width of 16em. I would like to have a footer extending across the entire width of the page, at the very bottom of the page (i.e., after both columns end). How can I do this? There is no way of knowing in advance which of the two columns will be...
8
1981
by: Harlan Messinger | last post by:
I created a page, currently viewable at http://mywebpages.comcast.net/hmessinger/cssbuttons1.html that displays a couple of buttons simulated with styles applied to <span> tags. The buttons have two classes applied to them, one of which has the sole effect of setting a fixed width of 125px. Then I added a DOCTYPE tag at the top of the file. In IE6, this killed the width and padding on the buttons, as seen at
8
1572
by: Dave Cook | last post by:
Hi I would like to create a table that uses the whole width of IE. I have set the table width to 100% and the right margin to 0 on the document but still the table is displayed about 50 pixels short of the window edge. Can anybody help me ? Thanks.
1
1778
by: | last post by:
Hi, I'm trying to right-align a context menu with its source control. Here's what I have to LEFT align it: '\\\ Dim pt As New Point(0, myButton.Height) myContextMenu.Show(myButton, pt) '///
2
24479
by: kudryk | last post by:
Is it possible through javascript to determine the width of a rendered table cell? I have two adjacent tables, one on top of the other. Both tables have the same number of columns, because the content of each column in the top table is related to the its corresponding column in the bottom table (I needed to use two tables because of the UI I had to design). Depending on the size of the numbers in the bottom table's columns, each individual...
1
2000
by: Jeff | last post by:
ASP.NET 2.0 I've got problems with the Width of the ImageMap below. The problem is that the ImageMap's Width doesn't have any effect in my GridView, the width are determine by width of the column and the with of the div (the div the ImageMap is included in). In the code below the column & div has Width of 300px and ImageMap has Width of 130, but when the page holding this GridView is displayed then the Width is 300 on the ImageMap. I...
5
11022
by: Taras_96 | last post by:
Hi everyone, Can anyone tell me why the top paragraph block stretches across the screen (as you would expect), while the bottom div doesn't stretch across the entire screen? When I set the width to 100% (which I interpret as saying 'make this width the same width as the parent (which is the entire screen)) the div is made just wide enough to fit it's contents, and if I decrease the value for the width, the width of the div stretches?!
3
3530
by: Sven C. Koehler | last post by:
Hello, the html below displays a box (#container) with a #footer and an #image inside. Is there any way how I could get rid of declaring max-width and max-height for the #image? The #image should fill up all the space left in the #container. <html><head></head><body><style type="text/css"> #image { max-width: 200px; max-height: 90px; } #container { position: fixed; width: 200px;
5
4188
by: DDubya | last post by:
Hello, Site: http://www.dryleague.com/newDefault.htm CSS: http://www.dryleague.com/css/style.css I'm trying align the date to the bottom-right of my "header" div. The "header" div has a padding of 5px all around. I was able to align the "headerDate" div to the bottom of the container, however, since I couldn't align right, I decided to make it width:100% and text-align:right. In FF3 & IE7, the "headerDate" div extends past the...
0
8739
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
8652
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
9234
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...
1
8983
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7831
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5907
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
4412
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4667
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2036
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.