26.05.10, 14:19:45
AranankA
Beitrag geändert von: AranankA - 26.05.10, 14:39:47
Die CSS Definition (css.css):
Code:
01:
02:
03:
04:
05:
06:
07:
08:
09:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
|
<html>
<head>
<title>CSS Definitionen</title>
<style type="text/css">
<!--
h1 {
font-size:48pt;
color:#ff0000;
font-style:italic;
border-bottom:solid thin black;
}
h2 {
font-size:36pt;
color:#009900;
font-style:courier;
}
#normtext {
font-size:20pt;
font-weight:bold;
color:#ffff66;
border:4pt;
}
-->
</style>
</head>
</html>
|
Die
index.php:
PHP:
01:
02:
03:
04:
05:
06:
07:
08:
09:
10:
11:
12:
13:
14:
15:
16:
17:
|
<!-- index.php -->
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Hompage von AranankA</title>
<link rel="stylesheet" type="text/css" href="./css/css.css">
<style type="text/css"></style>
</head>
<body>
<?php
echo "<h1>Willkommen auf einer, fast noch leeren, Webseite!</h1>";
echo "<h2>Hier entsteht bald eine neue Webpräsenz</h2>";
echo "<div id = \"normtext\">Dieser Text müsste eigentlich 20pt groß sein,
einen Rand haben und über eine fette, gelbe Farbe verfügen</div>";
</body>
</html> ?>
|
Die Ausgabe:
Klick mich, ich bin ein Link...
Warum wird
#normtext nicht übernommen, wohl aber die anderen Definitionen?
26.05.10, 15:59:53
Genesis
Wird bei mir korrekt angezeigt (Google Chrome). Vielleicht die Leerzeichen bei der Zuweisung weglassen? Die sind nicht HTML-konform.
26.05.10, 16:10:18
AranankA
Ich hatte in der Zwischezeit etwas gebastelt, von anderer Seite einen Tipp bekommen (Cache leeren...), und alles nochmal neu hoch geschickt:
Code:
01:
02:
03:
04:
05:
06:
07:
08:
09:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
|
/*css.css*/
<!--
#normtext {
font-size:20pt;
font-weight:bold;
color:#ffff66;
border-width:4pt;
border-style:solid;
}
h1 {
font-size:48pt;
color:#ff0000;
font-style:italic;
border-bottom:solid thin black;
}
h2 {
font-size:36pt;
color:#009900;
font-style:courier;
}
-->
|
PHP:
01:
02:
03:
04:
05:
06:
07:
08:
09:
10:
11:
12:
13:
14:
15:
16:
17:
18:
|
<!-- index.php -->
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Hompage von AranankA</title>
<link rel="stylesheet" type="text/css" href="css/css.css? <?php echo time();">
<style type="text/css"></style>
</head>
<body>
<?php
echo "<h1>Willkommen auf einer, fast noch leeren, Webseite!</h1>";
echo "<h2>Hier entsteht bald eine neue Webpräsenz</h2>";
echo "<div id = \"normtext\">Dieser Text müsste eigentlich 20pt groß sein, einen Rand haben und über eine fette, gelbe Farbe verfügen</div>";
?>
</body>
</html> ?>
|
So klappt es jetzt wohl auf allen Browsern...
Somit erledigt.