[英]link causes line spacing issue in IE
我有一段文字。 如果文本長於設置的長度,則在末尾添加一個鏈接“更多”。 我在IE中遇到的問題是,它迫使鏈接所在的行與上面的行分開,從而使其看起來很奇怪。 IT僅在IE中發生。
這是發生情況的鏈接: http : //www.melfordschoolofmotoring.co.uk/test.php
我想在帶有鏈接的行的頂部停止多余的邊距嗎?
if(mysql_num_rows($query)>0){
//There are testimonials to retrieve from Database
while($row = mysql_fetch_assoc($query)){
$test = htmlentities($row['test']);
$firstname = htmlentities($row['fn']);
$surname = htmlentities($row['sn']);
$date = date('d/m/Y',strtotime($row['date']));
$form_test = '';
if(strlen($test) > 180){
$form_test .= substr($test,0,181);
$form_test .= '<a href="test_more.php">...read more</a>';
}else if(strlen($test)<180){
$form_test .= $test;
}
echo '<div class="text_module_test"><!-- wraps each part of text in to a nice module -->';
echo '<p>'.$form_test.'</p>';
echo '<div class="test"><p>by '. $firstname .' '. $surname .' '. $date .'</p></div>';
echo '</div>';
}
}else{
//There aren't any testimonials in Database
echo '<p>There are currently no testimonials to display.</p>';
}
.text_module_test{
border:1px solid #6a77fa;
background-color:#e1e4fe;
padding:10px;
margin:20px 0 0 0;
width:350px;
min-height:90px;
text-align:justify;
overflow:hidden;
}
.text_module_test p{
margin:0;
}
.text_module_test a:link, .text_module_test a:visited{
font-size:12px;
padding:0;
margin:0;
text-decoration:none;
color:#777caa;
}
.text_module_test a:hover{
color:#000;
font-size:12px;
padding:0;
margin:0;
}
.test{
padding:5px;
margin:0 20px 0 0;
width:340px;
height:10px;
text-align:right;
}
.test p{
font-size:10px;
margin: 0;
}
看起來這是由於line-height: 34px;
對於.menu_item a:link, a:visited
在menu.css中 .menu_item a:link, a:visited
。 添加line-height: 100%;
對於在style.css中 .text_module_test a:link, .text_module_test a:visited
覆蓋此規則。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.