<hr>-Problem

Status
Nicht offen für weitere Antworten.

Nabi

Erfahrenes Mitglied
Hi, Ich habe hier ein Codeabschnitt , Ich wollte damit ein Tabelle mit Links machen.
was ich bei diesem Code nicht verstehe
Warum der LINIE Nicht am BOTTOM ist , Ich habe schon geschrieben
valign="bottom" aber trotzdem gibt ein Distanz zwischen der BOTTOM der Zelle
und der Linie, Das Bild kann diese Sache erklären.
für eine Lösung bin ich Dankbar.

HTML:
echo'
<table border="0" bgcolor="#FFe4e1" bordercolor="#ffdead" width="146" cellpadding="0" 
cellspacing="0" style="position:absolute; left:745px; top:101px">';
for($i=0;$i<6;$i+=1)
{
echo '
<tr>
<td align="center" valign="BOTTOM" bgcolor="FFe4e1" onmouseover="this.style.backgroundColor=\'#ffb6c1\'" 
onmouseout="this.style.backgroundColor=\'#FFe4e1\' " valign="bottom" >
<a href=""><font color="red">link</font></a><br><hr size="1px" color="red">
</td>
</tr>';
}
echo '</table>';
 

Anhänge

  • 25977attachment.jpg
    25977attachment.jpg
    12,7 KB · Aufrufe: 8
Alternativ zu dem hr-Element könntest Du doch auch für die Tabellenzelle einen unteren roten Rahmen definieren.
 
Das hr-Element ist eigentlich nur zur Abtrennung von semantischen Elementen innerhalb eines Dokuments.
Probier mal Folgendes:
PHP:
echo '<ul id="nav">';
for( $i = 0; $i < 6; $i += 1 ) {
	echo '<li><a href="foobar">link</a></li>';
}
echo '</ul>';
Dazu folgendes Stylesheet:
Code:
ul#nav {
	position: absolute;
	left: 745px;
	top: 101px;
	width: 146px;
	padding: 0;
	list-style: none;
}
ul#nav li a {
	display: block;
	background-color: #FFE4E1;
	border-bottom: thin solid #F00;
}
ul#nav li a:hover {
	background-color: #FFB6C1;
}
 
Alles ok , Danke.
PHP:
<?php
echo'
<table border="0" bgcolor="#FFe4e1" bordercolor="#ffdead" width="146" cellpadding="0" 
cellspacing="0" style="position:absolute; left:745px; top:101px">';
for($i=0;$i<6;$i+=1)
{
echo '
<tr>
<td align="center" valign="BOTTOM" bgcolor="FFe4e1" style="border-bottom: 1px solid; border-color:red" onmouseover="this.style.backgroundColor=\'#ffb6c1\'" 
onmouseout="this.style.backgroundColor=\'#FFe4e1\' " valign="bottom" >
<a href=""><font color="red">link</font></a>
</td>
</tr>';
}
echo '</table>';
?>
 

Anhänge

  • 25980attachment.jpg
    25980attachment.jpg
    12,7 KB · Aufrufe: 10
Status
Nicht offen für weitere Antworten.
Zurück