View Full Version : border-bottom
zoobie
04-28-2003, 02:54 AM
I was never able to get this....so, let's try again. :rolleyes:
I need an 2px underline for the text...but there's a 1/4 inch gap that has to go. I'm using:
<style>
.title {font:bold 40px times new roman; color:#000099; margin:0;padding:0;border-bottom:2px solid #000099}
</style>
</head>
<body>
<span class="title">HELLO</span>
Thanks :p
cg9com
04-28-2003, 07:14 AM
So you want the border to 'replace' the underline?
I don't believe it can be done because the border must go around the box and the underline appears inside the box.
There may be another solution, but I can't see it using plain HTML/CSS.
I'll ponder it, maybe we will both be enlightened.
F.N.G.
04-28-2003, 09:03 AM
Well, this is screwy & might only work in IE, but it does reduce the empty space:
<style>
.title {font:bold 40px times new roman;line-height: 75%;width:10%;color:#000099;border-bottom:2px solid #000099}
</style>
ronaldb66
04-28-2003, 12:10 PM
might only work in IE
Line-height is a standard CSS-1 property and should therefore give no problem at all.
zoobie
04-28-2003, 07:11 PM
Totally cool F.N.G. :cool: You got it. I had messed with line-height but it didn't touch it. I think the width attribute is helping in there, too. Anyway, it worked! Now, I don't have to use an image. Thanks :D
zoobie
04-30-2003, 08:32 AM
Awww...I just checked it in Nutscrape7 and it doesn't work... It still leaves 1/4 inch below it. Ha ha! :D
Any other ideas besides using an image? :p
F.N.G.
04-30-2003, 11:10 AM
<html>
<head>
<style>
.title {font:bold 40px times new roman;
line-height:75%;color:#000099}
.line{width:140px;border-top:2px solid #000099;
line-height:0%;font-size:1px}
</style>
</head>
<body>
<span class="title">HELLO<div class="line">
</div>
</span>
</body>
</html>
zoobie
05-01-2003, 10:37 AM
That one there is a weener. You're a diabolical wizard...Thanks :thumbsup: :cool: :D :o :eek: ;)
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.