wenn ich den ganzen Stil in den Style-Tag setze es funktioniert gut, aber wenn ich diese Codes in einem externen Stylesheet legt es keinen Stil im Frontend zeigt.externes Stylesheet zeigt keinen Stil, aber intern tut
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php $title; ?></title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<table border="1" cellpadding="2" cellspacing="2">
<tr>
<th>post ID</th>
<th>post title</th>
<th>post Description</th>
<th>Author</th>
<th>Date</th>
</tr>
<?php
foreach($posts as $post)
{
echo "
<tr>
<td>".$post->Post_id."</td>
<td>".$post->post_title."</td>
<td>".$post->Post_description."</td>
<td>".$post->author."</td>
<td>".$post->date."</td>
</tr>
" ;
}
?>
</table>
<body>
</body>
</html>
und mein externes Sheet ist /* CSS Dokument */
table{
width:1000px;
text-align:center;
margin:auto;
}
th{
background:#0CC;
animation-direction:normal;
height:50px;
}
td{
height:50px;
background:#396;
color:#FFF;
}
Ich verstehe DONot was falsch ist.
Können Sie versuchen, diese in php? 'if (file_exists (" css/style.css ")) echo" Ja ";' Vielleicht ist es ein falscher Pfad? Nur um klar zu sein, will ich das zwischen
und – AndreasWarum postest du einen Tisch zwischen Kopf und Körper? Es ist nach und vor
. Bist du sicher, dass das korrekt ist? – Andreas@DSaha ein bisschen Glück mit den Antworten? – Andreas