php - Why is there white space on the top and bottom of a link? -
i have h3 tag surrounded anchor tag there lot of white space on top , bottom of text can't seem off. post code have , image of how looks.
html/php:
echo '<div class="entertainment-loc-cont"> <a href="' . $object['link'] . '"><h3 class="entertainment-title">' . $object['title'] . '</h3></a> <a href="' . $object['link'] . '"><img src="' . $object['img_link'] . '" /></a> <div class="entertainment-info"> <p class="entertainment-line-1">' . $object['line_1'] . '</p> <p class="entertainment-line-2">' . $object['line_2'] . '</p> <p class="entertainment-line-3">' . $object['line_3'] . '</p> <p class="entertainment-line-4">' . $object['line_4'] . '</p> <p class="entertainment-line-5">' . $object['line_5'] . '</p> </div> </div>'; css:
.entertainment-loc-cont { width: 100%; } .entertainment-loc-cont img { width: 100%; } .entertainment-loc-cont { font-size: 2.5em; text-decoration: none; } .entertainment-title { color: #000000; }
according w3 specifications, default css values <h3> tag following:
h3 { display: block; font-size: 1.17em; margin-before: 1em; margin-after: 1em; margin-start: 0; margin-end: 0; font-weight: bold; } if wish change it, override in css, simplest way:
h3 { margin: 0; } 

Comments
Post a Comment