myGully.com

myGully.com (https://mygully.com/index.php)
-   Programmierung (https://mygully.com/forumdisplay.php?f=67)
-   -   Webseite an Browserfenster anpassen (https://mygully.com/showthread.php?t=2056171)

bola 04.06.10 16:44

Webseite an Browserfenster anpassen
 
Moin,

vorne weg: da ich noch nicht all zu viel Ahnung vom coden habe, erstelle ich Webseiten mit Tabellen.

Nun zu meinem Problem. Ich habe eine Webseite für eine Band gemacht, alles gesliced, mit Dreamweaver alles in Tabellen gepackt usw.
Nun kam das Problem, dass ich recht große Daten hatte und im Endeffekt eine gesamte Breite von 1680 hatte bzw. habe.
Daher hatte ich stundenlang eine Lösung gesucht, dass sich alles dem Browser und/oder der Auflösung anpasst.
Das habe ich nun endlich geschafft (mit %). Nun ist es aber so, dass ich für den Content die vorgesehene Grafik als Background gesetzt habe, welcher sich natürlich nicht dem Browserfenster anpasst und stur da bleibt, wo er ist.

Gibt es eine Lösung für dieses Problem?
Ich hoffe auf eure Hilfe.

Danke

bola 07.06.10 12:31

Hier hab ich für euch mal den aktuellen Quellcode.

Zitat:

<!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>Iron Fate</title>
<style type="text/css">
<!--
body {
background-color: #000;
}
-->
</style></head>

<body>
<center>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>
<td width="1680"><img src="Slices/if01.jpg" width="100%" /></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1154"><img src="Slices/if02.jpg" width="100%" /></td>
<td width="55"><img src="Slices/if03.jpg" width="100%" /></td>
<td width="66"><img src="Slices/if04.jpg" width="100%" /></td>

<td width="142"><img src="Slices/if05.jpg" width="100%" /></td>
<td width="263"><img src="Slices/if06.jpg" width="100%" /></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="327"><img src="Slices/if07.jpg" width="100%" /></td>

<td width="1090"><img src="Slices/if08.jpg" width="100%" /></td>
<td width="263"><img src="Slices/if09.jpg" width="100%" /></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="711"><img src="Slices/if10.jpg" width="100%" /></td>

<td width="56"><img src="Slices/if11.jpg" width="100%" /></td>
<td width="72"><img src="Slices/if12.jpg" width="100%" /></td>
<td width="58"><img src="Slices/if13.jpg" width="100%" /></td>
<td width="42"><img src="Slices/if14.jpg" width="100%" /></td>
<td width="58"><img src="Slices/if15.jpg" width="100%" /></td>
<td width="56"><img src="Slices/if16.jpg" width="100%" /></td>
<td width="66"><img src="Slices/if17.jpg" width="100%" /></td>
<td width="44"><img src="Slices/if18.jpg" width="100%" /></td>
<td width="63"><img src="Slices/if19.jpg" width="100%" /></td>

<td width="65"><img src="Slices/if20.jpg" width="100%" /></td>
<td width="48"><img src="Slices/if21.jpg" width="100%" /></td>
<td width="58"><img src="Slices/if22.jpg" width="100%" /></td>
<td width="283"><img src="Slices/if23.jpg" width="100%" /></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>
<td width="400"><img src="Slices/if24.jpg" width="100%" /></td>
<td width="232"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="Slices/if25.jpg" width="100%" /></td>
</tr>
<tr>
<td><img src="Slices/if32.jpg" width="100%" /></td>
</tr>

<tr>
<td><img src="Slices/if33.jpg" width="100%" /></td>
</tr>
<tr>
<td><img src="Slices/if34.jpg" width="100%" /></td>
</tr>
</table></td>
<td width="207"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>

<td><img src="Slices/if26.jpg" width="100%" /></td>
</tr>
<tr>
<td><img src="Slices/if29.jpg" width="100%" /></td>
</tr>
</table></td>
<td width="452"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="Slices/if27.jpg" width="100%" /></td>

</tr>
<tr>
<td width="452" height="496" valign="top" background="Slices/Bilder/if30.jpg" td class=\"transparent_class\"><p><div style="overflow:auto;height:496px;width:452px">
<?
if(!isset($site)) $site="news";
//Sichheitsl&uuml;cke beheben
$invalide = array('/','/\/',':','.');
$site = str_replace($invalide,' ',$site);
if(!file_exists($site.".php")) $site = "news";
include($site.".php");
?> </p></td>
</tr>

<tr>
<td><img src="Slices/if35.jpg" width="100%" /></td>
</tr>

</table></td>
<td width="389"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="Slices/if28.jpg" width="100%" /></td>
</tr>
<tr>
<td><img src="Slices/if31.jpg" width="100%" /></td>
</tr>
</table></td>

</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1023"><img src="Slices/if36.jpg" width="100%" /></td>
<td width="104"><img src="Slices/if37.jpg" width="100%" /></td>
<td width="553"><img src="Slices/if38.jpg" width="100%" /></td>

</tr>
</table></td>
</tr>
<tr>
<td width="1680"><img src="Slices/if39.jpg" width="100%" /></td>
</tr>
</table></td>
</tr>
</table>

</center>
</body>
</html>

LordPresten 07.06.10 17:26

kannst du davon mal bitte nen Screenshot machen, damit ich des auch verstehe?

Thorasan 07.06.10 19:32

Meinst du sowas in der Art?
[Link nur für registrierte und freigeschaltete Mitglieder sichtbar. Jetzt registrieren...]

Oder eher das du das Bild nun angepasst haben willst?
Weil wenn ja dann würde ich nur die möglichkeit wissen per JavaS***** ne Fenstergrößenabfrage zu machen und es dann anzupassen... Wobei des halt schon recht aufwändig ist und evtl nicht überall geht...

bola 08.06.10 02:25

Also momentan würde es so aussehen, da der Content eine feste Größe hat und der Rest eine Prozentangabe.
[Link nur für registrierte und freigeschaltete Mitglieder sichtbar. Jetzt registrieren...]

wird das Fenster kleiner, werden die Abstände größer.

Ich möchte das nun so haben, dass der Contentbereich auch kleiner wird, wenn ich das Fenster kleiner mache.

So, wie es Thorasan in dem link hat, stell ich mir das vor

bola 09.06.10 11:19

Hat niemand eine Idee? Mir rennt die Zeit weg.

Um nochmal zu erklären, was ich möchte:
-Webseite soll sich an Größe des Browserfensters anpassen
-tut sie auch bei Prozentangabe
-für den Contentbereich habe ich die Grafik in den Background gepackt und die Content-PHP drüber gelegt

wie schaffe ich es nun, dass sich die Contentgrafik, samt Inhalt auch dem Browserfenster anpasst?

LordPresten 09.06.10 12:33

Prozentangaben, wie du es oben gesagt hast,
Schrift größe mit Prozent usw.

bola 09.06.10 19:49

und wie gebe ich dem content-background eine prozentangabe?
so sieht es momentan aus:

Zitat:

<td width="419" height="446" valign="top" background="Slices/if27.jpg" td class=\"transparent_class\"><p><div style="overflow:auto;height:430px;width:400px"><?
if(!isset($site)) $site="news";
//Sichheitsl&uuml;cke beheben
$invalide = array('/','/\/',':','.');
$site = str_replace($invalide,' ',$site);
if(!file_exists($site.".php")) $site = "news";
include($site.".php");
?></p></td>


Alle Zeitangaben in WEZ +1. Es ist jetzt 04:53 Uhr.

Powered by vBulletin® (Deutsch)
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.