Problem mit Style
DragonMaster
Hallo,
ich hab das problem das ich bei meiner Homepage noch eine Datei eingefügt hab, aber jedes mal wenn ich die inhalt.php änder verschiebt sich der text auf der rechten seite (rechts.php) nach unten!
Hab auch mal nen Screenshot gemacht.
..::Hier Klicken::..
pls help me
GreenRover
joa, quelltext währe da schon praktisch, aber ich vermute mal nicht, das du alles in einzelne tabellen spalte getahen hast, oder in absolut positionierte div`s
DragonMaster
also ich habs in div's
index.php:
| php: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
|
<?php
$datei = ($_POST['page']) ? $_POST['page'] : ($_GET['page']) ? $_GET['page'] : "inhalt";
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n";
echo " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
echo "<html>\n";
echo " <head>\n";
echo " <title>Meine Freewar Profile</title>\n";
echo " <link rel=\"stylesheet\" type=\"text/css\" href=\"page.css\" />\n";
echo " <meta http-equiv=\"Content-Type\"
content=\"text/html; charset=ISO-8859-1\" />\n";
echo " </head>\n";
echo " <body>\n";
echo " <div id=\"root\">\n"; // ganz oberer Div-Holder
echo " <div id=\"banner\">\n"; // banner
include "bannerindex.php";
echo " </div>\n";
echo " <div id=\"links\">\n"; // linkes Menu
include "menuindex.php";
echo " </div>\n";
echo " <div id=\"mitte\">\n"; // In der Mitte der Inhalt
include $datei .".php";
echo " </div>\n";
echo " <div id=\"rechts\">\n"; // rechtes Menu
include "rechtsindex.php";
echo " </div>\n";
echo " <div id=\"unten\">\n"; // rechtes Menu
include "unten.php";
echo " </div>\n";
echo " <br style=\"clear:both;\" />\n"; // css-float beenden
echo " </div>\n";
echo " </body>\n";
echo "</html>\n";
?> |
|
page.css:
| php: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
|
<?php #banner {
height: 150px;
}
#links {
width: 30%;
float: left;
}
#mitte {
width: 69%;
float:left;
}
#rechts {
width: 20%;
float: right;
}
#unten {
height: 100px;
} ?> |
|
GreenRover
und genau dort liegt dein problem, ich würde das ganze bei dem design lieber mit tabellen regeln,
oder halt im CSS position:absolute; und dann noch mit lef:100px; und heght:100px; die psoitionen fest legen, wobei das ganze dann so starr ist, das es sich nicht mehr an die verschiedenen Auflösungen anpassen kann.
DragonMaster
haste mal nen beispiel mit der css datei?
GreenRover
am einfachsten geht das was du vor hast, so:
| php: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
|
<?php
$datei = ($_REQUEST['page'])?$_REQUEST['page']:"inhalt";
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Meine Freewar Profile</title>
<link rel="stylesheet" type="text/css" href="page.css" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td colspan="3" height="150" align="center" valign="middle">
<?PHP include("bannerindex.php"); ?>
</td>
</tr>
<tr>
<td align="left" valign="top" width="30%">
<?PHP include("menuindex.php"); ?>
</td>
<td align="left" valign="top" width="50%">
<?PHP include($datei.".php"); ?>
</td>
<td align="left" valign="top" width="20%">
<?PHP include("rechtsindex.php"); ?>
</td>
</tr>
<tr>
<td colspan="3" height="100" align="center" valign="middle">
<?PHP include("unten.php"); ?>
</td>
</tr>
</table>
</body>
</html> |
|
bitte erst genau so übernehmen und dan änderungen machen
DragonMaster
thx habs auf meinem xampp getestet und es läuft einwandfrei
bleib des dann wenn ich ne datei aufruf mit ?page=DATEINAME in der mitte wo der inhalt is?
GreenRover
die funktion habe ich nicht verändert, nur das Design und dir logische Struktur.
Also also er includet imemr noch in der mitte die date, die du ihm mitlieferst per POST oder GET
DragonMaster
ok danke funtzt perfekt
vielen dank
GreenRover
kein prob, es währe auch mit den Divs so gegangen, währe aber doch ein wenig zu umständlich gewesen, fidne ich.
DragonMaster
Hallo,
ich hab schon wieder nen Problem (die häufen sich in letzter Zeit).
Und zwar hab ich mir ne Neue Navigation gemacht die aus Tabellen sind.
Diese Navi rückt aber immer weiter nach unten je länger die seiten sind (das kommt bei den Lycris seiten vor).
die Navi:
| php: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
|
<?php <head>
<script type="text/javascript">
function FensterOeffnen (Adresse) {
Fenster1 = window.open(Adresse, "Zweitfenster", "width=500,height=400,left=150,top=150");
Fenster1.focus();
}
</script>
</head>
<style type="text/css">
<!--
a:link { color: #FFFFFF; text-decoration:underlined; }
a:active { color: #FFFFFF; text-decoration:none; }
a:visited { color: #FFFFFF; text-decoration:none; }
//-->
</style>
<table style="height: 100%;" width="140" align="left" valign="top">
<td style="background-image:url(http://pc-club.ath.cx/images/Bild4.gif); width:150px;">
<table width="100%">
<tr>
<td style="background-color: #4B5F79" align="center">
<p align="center" style="margin-top: 0; margin-bottom: 0"><b><font face="Verdana" size="2"><font color="#FFFFFF">Hauptmenü</font> </font></b></p></td>
</tr>
<tr>
<td>
<table width="100%">
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<p>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="/">Startseite</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=lycris">Lycris</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=bilder">Bilder</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=drachen">Drachen</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=links">Links</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=aboutme">About Me</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=kontakt">Kontakt</a></font></td>
</tr>
</table>
</td>
</tr>
<tr>
<table width="100%">
<tr>
<td style="background-color: #4B5F79" align="center">
<p align="center" style="margin-top: 0; margin-bottom: 0"><b><font face="Verdana" size="2"><font color="#FFFFFF">Server</font></font></b></p></td>
</tr>
<tr>
<td>
<table width="100%">
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<p>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=domains">Domains</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=daten">Tech. Daten</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=downloads">Datei Downloads</a></font></td>
</tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=downloads">Bilder Downloads</a></font></td>
</tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=downloads">Lycris Downloads</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="oeffnen.php" onclick="FensterOeffnen(this.href); return false">Datei Upload</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="bilderup.php" onclick="FensterOeffnen(this.href); return false">Bilder Upload</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="lycrisup.php" onclick="FensterOeffnen(this.href); return false">Songtext Upload</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=downloads">PHPMyAdmin</a></font></td>
</tr>
</table>
<table width="100%">
<tr>
<td style="background-color: #4B5F79" align="center">
<p align="center" style="margin-top: 0; margin-bottom: 0"><b><font face="Verdana" size="2"><font color="#FFFFFF">Links</font></font></b></p></td>
</tr>
<tr>
<td>
<table width="150%">
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<p>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a target="_blank" href="http://action.freewar.de">Action Freewar</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a target="_blank" href="http://freewar.de">Freewar</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a target="_blank" href="http://woltlab.de">Woltlab</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a target="_blank" href="http://ohost.de">Ohost</a></font></td>
</tr>
</table></table></table></table> ?> |
|
so ja und ich hab mir mal überlegt ob des mit ner andern Tabelle in der andern datei gelöst werden kann. Nur die frage is ob des geht weil sich dann des bild voll verschieben würde.
Haste da ne lösung gegen des Prob
GreenRover
so sollte es gehen:
| code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
|
<script type="text/javascript">
function FensterOeffnen (Adresse) {
Fenster1 = window.open(Adresse, "Zweitfenster", "width=500,height=400,left=150,top=150");
Fenster1.focus();
}
</script>
</head>
<style type="text/css">
<!--
a:link { color: #FFFFFF; text-decoration:underlined; }
a:active { color: #FFFFFF; text-decoration:none; }
a:visited { color: #FFFFFF; text-decoration:none; }
//-->
</style>
<table style="height: 100%;" width="140" align="left" valign="top">
<td style="background-image:url(http://pc-club.ath.cx/images/Bild4.gif); width:150px;" valign="top">
<table width="100%">
<tr>
<td style="background-color: #4B5F79" align="center">
<p align="center" style="margin-top: 0; margin-bottom: 0"><b><font face="Verdana" size="2"><font color="#FFFFFF">Hauptmenü</font> </font></b></p></td>
</tr>
<tr>
<td align="left" valign="top">
<table width="100%">
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<p>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="/">Startseite</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=lycris">Lycris</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=bilder">Bilder</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=drachen">Drachen</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=links">Links</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=aboutme">About Me</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=kontakt">Kontakt</a></font></td>
</tr>
</table>
</td>
</tr>
<tr>
<table width="100%">
<tr>
<td style="background-color: #4B5F79" align="center">
<p align="center" style="margin-top: 0; margin-bottom: 0"><b><font face="Verdana" size="2"><font color="#FFFFFF">Server</font></font></b></p></td>
</tr>
<tr>
<td>
<table width="100%">
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<p>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=domains">Domains</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=daten">Tech. Daten</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=downloads">Datei Downloads</a></font></td>
</tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=downloads">Bilder Downloads</a></font></td>
</tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=downloads">Lycris Downloads</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="oeffnen.php" onclick="FensterOeffnen(this.href); return false">Datei Upload</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="bilderup.php" onclick="FensterOeffnen(this.href); return false">Bilder Upload</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="lycrisup.php" onclick="FensterOeffnen(this.href); return false">Songtext Upload</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a href="?page=downloads">PHPMyAdmin</a></font></td>
</tr>
</table>
<table width="100%">
<tr>
<td style="background-color: #4B5F79" align="center">
<p align="center" style="margin-top: 0; margin-bottom: 0"><b><font face="Verdana" size="2"><font color="#FFFFFF">Links</font></font></b></p></td>
</tr>
<tr>
<td>
<table width="150%">
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<p>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a target="_blank" href="http://action.freewar.de">Action Freewar</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a target="_blank" href="http://freewar.de">Freewar</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a target="_blank" href="http://woltlab.de">Woltlab</a></font></td>
</tr>
<tr>
<td onmouseover="this.style.backgroundColor='#668899';" onmouseout="this.style.backgroundColor='transparent';">
<font face="Arial" size="2">
<a target="_blank" href="http://ohost.de">Ohost</a></font></td>
</tr>
</table></table></table></table> |
|
Ich habe dne CODE nicht komplett verbesser, Man könnte ihn noch mindestens halbieren. Haben ur noch 2-3 valign="top" hinzugefügt.
Besorge dir mal for den Mozilla Firefox die Developper Toolbar, damit kann man sowas immer sehr schnell ausloten.
DragonMaster
ja funtzt perfekt
wo kann ich mir des teil runterladen?