English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

The Text underline is too thick (about 3-4 px) in FireFox (in IE it is 1px), if I use the code below

h1 {
COLOR: White;
FONT-WEIGHT: bold;
FONT-SIZE: 30px;
TEXT-DECORATION: underline;
}

How to set the underline thickness to 1 px?

2006-11-17 23:10:52 · 4 answers · asked by Mark M 3 in Computers & Internet Programming & Design

4 answers

I would use the border property too... like this:

underline me



Good Luck!

2006-11-17 23:22:07 · answer #1 · answered by MuffinMan 4 · 0 0

Css Underline Thickness

2016-11-08 05:16:08 · answer #2 · answered by ? 4 · 0 0

The underline thickness depends on the font-size of the text. Instead of using text-decoration, why not use border-bottom instead? So in your example:

h1 {
color: White;
font-weight: bold;
font-size: 30px;
border-bottom: 1px solid White;
}

If you don't like the border stretching across the full width of the header, then add display: inline to the styles above.

2006-11-17 23:18:14 · answer #3 · answered by Isofarro 3 · 2 0

Use the border-bottom property instead?

border-bottom: 1px solid #000000;

2006-11-17 23:18:17 · answer #4 · answered by azuri2005 1 · 0 0

fedest.com, questions and answers