Witajcie. Chciałem na swojej stronie zamienić linki do podstron na buttony zrobione w css.
Więc stworzyłem classe nazwałem ją link_button. Generalnie wyszło to tak:
.link_button {
padding: 8px;
text-align: center;
text-decoration: none;
font: 14px/100% Jazz LET, fantasy;
background-color: #ababab;
box-shadow: 0 0 10px #4dc95f, 0 0 40px #379945, 0 0 10px #43de59;
border: none;
border-radius: 18px;
box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease 0s;
cursor: pointer;
outline: none;
}
No ale stwierdziłem, że fajnie by było gdyby między tymi buttonami były odstępy. Więc do kodu powyższego dodałem:
display: inline-block;
Jak widać na zdjęciu w dwóch buttonach nie ma odstępu.
Kod tabeli z tymi linkami wygląda tak:
<? $fn = substr($_SERVER['PHP_SELF'], strrpos($_SERVER['PHP_SELF'], "/") + 1); ?>
<tr><td class=outer align=center>
<table class=main width=850 cellspacing="0" cellpadding="5" border="0">
<tr>
<? if($CURUSER){?><td align="center" class="link_button"><a href=/>1</a></td>
<td align="center" class="link_button"><a href=/xx.php>2</a></td>
<td align="center" class="link_button"><a href=/xxx.php><font color=blue>3</font></a></td>
<td align="center" class="link_button"><a href=/xxx.php>4</a></td><?}?>
<? if (!$CURUSER) { ?>
<td align="center" class="link_button"><a href=xx.php>5</a> / <a href=/xx.php>6</a>
</td>
<? } else { ?>
<td align="center" class="link_button"><a href=xx.php>7</a></td>
<? } ?>
<? if($CURUSER){?><td align="center" class="link_button"><a href=/xx.php>8</a></td>
<td align="center" class="link_button"><a href=/xx.php>9</a></td><?}?>
<td align="center" class="link_button"><a href=/xx.php><font color=red>10</font></a></td>
<td align="center" class="link_button"><a href=/xx.php><font color=red>11</font></a></td>
<? if($CURUSER){?><td align="center" class="link_button"><a href=/xx.php>12</a></td>
<td align="center" class="link_button"><a href=/xx.php><font color=#cc6600>13</font></a></td>
<td align="center" class="link_button"><a href=/xx.php>14</a></td>
<td align="center" class="link_button"><a href=/xx.php>15</a></td><?}?>
</tr>
</table>
</td>
Zauważyłem, że problem występuje po <?}?> Próbowałem dać :
<?}?><p>
Ale bez efektu, kiedy dałem
<?}?><br>
to efekt przyniosło zrobił się odstęp ale wszystkie buttony zjechały mi o wiersz niżej ;/
Dla jasności wszystko co jest w <? if($CURUSER){?> nie widzi tego osoba niezalogowana.
A co jest w <? if (!$CURUSER) { ?> nie widzi tego osoba zalogowana.
Ma ktoś jakiś pomysł ?