Here is what i try to do:
I load my tags from MYSQL, and i use css, to make them look nice. But when one tag field is empty, it still apear the border and the padding … as an empty box, with no text inside. How to make, to not display that border and padding when the tag field is empry?
HTML code:
<a href="#<?php echo $tag1;?>.php" class="tag" style="position: relative; top: 0px"><?php echo $tag1;?></a>
CSS code:
.tag {
-moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
-webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
box-shadow:inset 0px 1px 0px 0px #ffffff;
background-color:#ededed;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
border:1px solid #dcdcdc;
display:inline-block;
color:#777777;
font-family:arial;
font-size:10px;
font-weight:bold;
padding:2px 5px 2px 5px;
text-align:left;
text-decoration:none;
text-shadow:1px 1px 0px #ffffff;
float:left;
margin:5px 0px 0px 5px;
}.tag:hover {
background-color:#dfdfdf;
}.tag:active {
position:relative;
top:1px;
}
Why not only render valid tags?