Autor Beitrag
Supernova
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 108

WinXP
D7 Prof
BeitragVerfasst: Di 11.04.06 13:05 
Hallo,

also ich schlage mich schon seit einiger Zeit mit folgendem Problem herum:

Ich habe nun eine Tabelle: <table width="100%">...</table

So wenn ich dies jetzt nun im Browser ausgeben will (FF) erscheinen die Scroll-Leisten und die Tabelle ist größer als der Bildschirm. So nun wollte ich fragen wie ich es hinbringe dass:

-bei jeder Auflösung, egal ob 1024x786 oder 2048x1024 usw. die Tabelle richtig auf dem bildschirm verteilt wird, damit praktisch keine Scrollleisten erscheinen und dass die Tabelle, genau die Breite von dem Bildschirm hat...

Danke schon mal ... :wink:

Grüße,
Supernova

_________________
Input - Output => Ganz Kaputt
*** MFG Supernova ***
DelphiAnfänger
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 112

Win XP, Firefox 2.0, IE6
Delphi 5 Prof., Delphi 2005 PE
BeitragVerfasst: Di 11.04.06 13:34 
also bei mir geht das so
kannst ja mal 99% einstellen und gucken obs dann geht oder über css:
ausblenden Quelltext
1:
<table style="width:100%">...</table>					

de.selfhtml.org/html...g.htm#breiten_hoehen
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Di 11.04.06 13:36 
Normalerweise sollte width=100% dafür ausreichen - oder meinst du vertikale Scrollleisten?

AXMD
Supernova Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 108

WinXP
D7 Prof
BeitragVerfasst: Di 11.04.06 14:01 
Nein ich meine die Horizontalen Scrollleisten...

und 2. geht das nicht mir CSS irgendwie schöner ?

Grüße,

_________________
Input - Output => Ganz Kaputt
*** MFG Supernova ***
matze.de
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 576

Win95, Win98 SE, WinXp Prof SP2
D7P, D8P, FPC2.0
BeitragVerfasst: Di 11.04.06 15:46 
Also ich verstehe nicht ganz warum es bei dir nicht geht. Ich habs mal kurz selber gemacht und da funktioniert es wunderbar:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
  <title>Tabelle</title>
</head>

<body>
  <table width="100%">
    <tr>
      <td>1</td>
      <td>2</td>
    </tr>
  </table>
</body>

</html>


Und das Ganze sieht so aus wie auf dem Screenshot im Anhang.
Einloggen, um Attachments anzusehen!
_________________
si tacuisses, philosophus mansisses.
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Mi 12.04.06 16:23 
Im Body-Bereich bzw. mittels Stylesheet den Margin auf 0 stellen.

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
CSS:
<style>
 body
  {
    margin: 0px;
  }
</style>

HTML:
<body style="margin: 0px;">

oder nicht HTML-Konform (damit es der Opera auch versteht ;-)):
<body topmargin="0" leftmargin="0" rightmargin="0">
Brother John
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 28

WinXP
Turbo Delphi Explorer Win32
BeitragVerfasst: Mi 12.04.06 22:11 
onlinehome, so kann ich das nicht stehen lassen. Dass Opera eine nicht-standardkonforme Notation braucht, ist Quatsch. Sowohl Inline- als auch Header-Variante funktionieren im Standard- und Quirksmode bestens.

Bei der Header-Variante fehlt übrigens die Angabe des Style-Typs:
<style type="text/css">
muss es heißen.

_________________
Grüße
Brother John
Anarkids
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 81

Win XP Pro, Freundin
Delphi 2006, C/C++, VisualBasic
BeitragVerfasst: Do 13.04.06 07:18 
probier doch das mal:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
<style type="text/css">
body {
  margin: 20px 0px;
  text-align: center;
  background-color: #0080c0;

}
#box {
  width: 100%;
  padding: 15px;
  text-align: left;
  background-color: #ffffc6;
}
</style>

(...)

<div id="box">...</div>


Hab's jetzt nicht getestet. Nur einfach ma quick'n'dirrty ;-)

ja und die <table> schreibst du einfach zwischen die <div> anweisungen...

mfg...

ps.: muss die tabelle unbedingt 100% ausfüllen? wenn ja, sollte es mit <table width="100%"> schon klappen, wie die anderen schon sagten...

_________________
Mr.D
Change begins with you - TODAY!
Brother John
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 28

WinXP
Turbo Delphi Explorer Win32
BeitragVerfasst: Do 13.04.06 13:47 
Die Lösung erzeugt trotzdem den horizontalen Scrollbalken.
Auf folgende Weise gehts im aktuellen Opera, FF und IE:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <title>Test</title>
  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
  <style type="text/css">   
  body {
    margin: 0;
  }   
  table {   
    width: 100%;
    border: solid black;
  }   
  </style>
</head>

<body>
  <table>
    <tr>
      <td>test</td>
    </tr>
  </table>
</body>
</html>

_________________
Grüße
Brother John