开发者

How to underline the hyper-link spreaded on two lines. CSS-HTML geeks?

开发者 https://www.devze.com 2023-01-27 14:58 出处:网络
I applied the following CSS to the above text. How to make the underline of above hyperlink to be appear开发者_如何学JAVA as the one below. For example like this one

How to underline the hyper-link spreaded on two lines. CSS-HTML geeks?

I applied the following CSS to the above text. How to make the underline of above hyperlink to be appear开发者_如何学JAVA as the one below. For example like this one

How to underline the hyper-link spreaded on two lines. CSS-HTML geeks?

.result-listingext h3 
{

    display:block;
    margin:0;
    padding-right:10px;
    padding-left:10px;
    color:#b2002f;
    font-family: Arial, Verdana;
    text-decoration: none; 
    background: white; 
    font-size:0.94em;
    font-weight:normal; 
    line-height:1.3; 
}

    .result-listingext h3 a:visited  
{
    font-family: Arial, Verdana;
    text-decoration: none;  
    background: white; 
    font-size:0.94em;
    color:#000;
    font-weight:normal;
    line-height:1.3; 
}   


.result-listingext h3 a:link,
.result-listingext h3 a:hover,
.result-listingext h3 a:focus,
.result-listingext h3 a:active {
    color:#b2002f;
        font-family: Arial, Verdana;
    text-decoration: none;  background: white; 
    font-size:0.94em;
    font-weight:normal;
    line-height:1.3; 
}


To make a text underline different from the text's colour, you need border-bottom.

border-bottom: 1px grey solid;

JSFiddle here

You can use padding-bottom / padding-top and line-height to control the distances between text and border, and each line.


I think you're looking for:

CSS:

.myClass a
{
   text-decoration: underline;
}

Instead of none like you have.

0

精彩评论

暂无评论...
验证码 换一张
取 消