HTML Tabelle kann nicht formatiert werden

obi

Aktives Mitglied
Thread Starter
Dabei seit
04.01.2007
Beiträge
233
Reaktionspunkte
12
Hallo,

ich habe ein total dummes Problem, was ich aber trotzdem nicht gelöst bekomme.

Ich habe 2 Tabellen auf einer Seite mit der gleichen Formatierung. Aber nur die zweite wird vernünftig angezeigt.
Speziell geht es mir um die Breite der Spalten. Hier mal der komplette HTML Code (ist eigentlich in php programmiert).

Wäre euch sehr für einen Tipp dankbar.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<!-- ******* Head ************************************************************ -->

<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta http-equiv="content-language" content="de" />
	<title>FRS</title>
	<meta name="keywords" content="" />
	<meta name="description" content="***" />
	<link rel="stylesheet" type="text/css" href="default.css" />		
	
	<script type="text/javascript" src="script.js"></script>
</head>


<body>

<div id="ol_top">
	<div id="logo">
	</div>
</div>
<div id="ol_middle">
	<div id="wrapper">
		<div id="nav">
			<a href="index.php"><span class="nav">Home</span></a> 
			<a href="index.php?doc=siwa" ><span class="nav">***</span></a>
			<a href="index.php?doc=eh" ><span class="nav">***/span></a>
			<a href="index.php?doc=shop" ><span class="nav">Shop</span></a>
			<a href="index.php?doc=imp"><span class="nav">Impressum</span></a>
		</div>
		<div id="content">
			<h1>Bestellungen</h1>

<h2>Nicht bearbeitete Bestellungen</h2>
<table><colgroup>
	<col width="100px" span="1" />
	<col width="400px" span="1" />
	<col width="50px" span="1" />
	<col width="70px" span="1" />
	<col width="100px" span="1" />
</colgroup>


<tr><td colspan="5"><b>&nbsp;</b></td></tr>
			  <tr><td colspan="5"><b>11 RAP</b></td></tr><tr>
  		  	<td>100101</td>
  		  	<td>***</td>
  		  	<td>3</td>
  		  	<td>29.99</td>
  		  	<td>
  		  		<form action="index.php?doc=admin/bestellungen" method="post" style="background-color: transparent;">
  		  			<p><input type="hidden" value="43" name="Bestell_ID" />
  		  			<input type="submit" value="Bestellung abgeschlossen" /></p>
  		  		</form>
  		  	</td>
  		  </tr><tr>
  		  	<td>100102</td>
  		  	<td>****</td>
  		  	<td>1</td>
  		  	<td>39.95</td>
  		  	<td>
  		  		<form action="index.php?doc=admin/bestellungen" method="post" style="background-color: transparent;">
  		  			<p><input type="hidden" value="42" name="Bestell_ID" />
  		  			<input type="submit" value="Bestellung abgeschlossen" /></p>
  		  		</form>
  		  	</td>
  		  </tr></table>

<h2>Abgeschlossene Bestellungen</h2>
<table><colgroup>
	<col width="100px" span="1" />
	<col width="400px" span="1" />
	<col width="50px" span="1" />
	<col width="70px" span="2" />
</colgroup>
<tr><td colspan="5"><b>&nbsp;</b></td></tr>
			  <tr><td colspan="5"><b>1 ****</b></td></tr><tr>
  		  	<td>100102</td>
  		  	<td>****</td>
  		  	<td>2</td>
  		  	<td>39.95</td>
  		  	<td>
  		  	</td>
  		  </tr><tr>
  		  	<td>100102</td>
  		  	<td>*****</td>
  		  	<td>2</td>
  		  	<td>39.95</td>
  		  	<td>
  		  	</td>
  		  </tr></table>		</div>
	</div>
</div>
<div id="ol_down">
</div>



</body>
  
</html>
 
Gibt’s ein CSS auch dazu?
…und vielleicht einen Screenshot deines Problems.
*glaskugel.reib*

;)
 
Naja im Css steht nix drin,würde ich sagen,dafür ist sie sehr groß.

Skreenshot habe ich angehängt. Wie gesagt es geht um die Breite. Die eine Spalte wird deshalb zweizeilig dargestellt.

Code:
/* blau: #001ca5 */

/* rot: #cd0004  */

body {margin: 0px;
		padding: 0;
		font-size: 15px;
		font-family: "Helvetica", "Arial", "sans-serif";
		text-align: justify;
		color: black;
		padding: 0px;
		margin: 0px;
		background-color: white;}
		
#ol_top {width: 1080px;
		margin: 0 auto;
		height: 150px;
		background-image: url(images/top.png);
		background-repeat: none;}
		
#ol_middle {
		width: 1080px;
		margin: 0 auto;
		padding-bottom: 20px;
		background-image: url(images/middle.png);
		background-repeat: repeat-y;}
		
#ol_down {width: 1080px;
		margin: -20px auto;
		height: 90px;
		background-image: url(images/down.png);
		background-repeat: none;}

#logo { padding: 100px 130px 0px 0px;
		width: 520px;
		height: 50px;
		/*border: 1px solid blue;*/
		background-image: url(images/logo.png);
		background-repeat: no-repeat;}

#wrapper { 
		margin: 0px auto;
		width: 1000px;
		min-height: 400px;
		padding: 0px;
		/*border: 1px solid red;*/
		}
#nav {width: 999px;
	  height: 40px;
	  background-image: url(images/nav.png);
	  background-repeat: repeat-x;
	  padding-top: 9px;
	  font-size: 17px;}
#nav a {color: black;
		text-decoration: none;}
#nav a:hover {
		color: #cd0004 
		}
#nav a.active {
		color: #cd0004 
		}


.nav { margin:0px 40px 0px 50px;}

#content { /*border: 1px solid green;*/
		margin: 0 auto;
		width: 900px;}
		
		
#home {margin:10px auto 0px;
		width: 590px;
		height: 337px;
		background-image: url(images/home.png);
		background-repeat: no-repeat;}
#home1 {width: 294px;
		height: 160px;
		float:left;}
#home2 {width: 295px;
		height: 160px;
		float:left;}
#home3 {width: 294px;
		height: 160px;
		float:left;}
#home4 {width: 295px;
		height: 160px;
		float:left;}
		

h1 {padding: 0px;
	margin: 20px 0px 7px;;}
h2 {color: #cd0004;
	font-size: 18px;
	margin: 10px 0px 5px;
	padding: 0px;}

p {margin: 0px 0px;
	padding: 0px;}		
a {		text-decoration: none;
		color: #cd0004;
		}
a:hover {text-decoration: underline;}


#foto {
	float: right;
	width: 210px;
	/*border: 1px solid black;*/
	padding: 0px;
	margin: 0px 10px;
}

.foto {
	float: left;
	width: 200px;
	border: 1px solid black;
	margin: 5px 0px;
	padding 0px;
}

form {
	background-color: #eaeaea;
	padding: 10px;
	width: 650px;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	}
	
/* ******** SHOP ***************************** */

.shop_kasten {
	border: 2px solid #eaeaea; 
	width: 430px;
	height: 200px;
	padding: 5px;
	margin-bottom: 10px;}
	
.shop_kasten_right	{
	float: right;
	
	width: 430px;
	margin-left: 10px;}
	
.shop_kasten h1 {
	font-size: 20px;
	color: black;
	margin-top: 5px;
	margin-bottom: 15px;
}


.shop_kasten h1 a {
	text-decoration: none;
	color: black;
}

.shop_kasten img {
	float: right;
	height: 180px;
	margin-top: 10px;
}


.description{
	width: 300px;
	height: 135px;
	/*border: 1px solid red;*/
	overflow: hidden;
}

.shop_kasten .short {
	float: left;
	margin-right: 10px;
	width: 100px;
}
.shop_kasten .short2 {
	float: left;
	margin-right: 10px;
	width: 170px;
}

.shop_kasten .long {
	float: left;
	margin-right: 10px;
	width: 250px;
}

.more{
	float: right;
	width: 250px;
	margin: 0px;
}

.shop_image{
	float: left;
	width: 180px;
	margin-top: 5px;
	margin-right: 30px;
}

.shop_image img {
	width: 175px;
}

.warenkorb {
	float: right;
	width: 200px;
	border: 1px solid black;
	background-color: #eaeaea;
	
}

.warenkorb p {
	margin: 5px;
}

.warenkorb h2 {
	margin: 5px;
}

.warenkorb form{
	background-color: transparent;
	width: auto;
}

.shortdesc {
	margin: 5px;
	margin-top: 30px;
	height: 230px;
	overflow: hidden;
}

.longdesc {
	margin: 1px;
	
}
 

Anhänge

  • Bild1.png
    Bild1.png
    29,1 KB · Aufrufe: 81
Liegt an der Breite 650px des Form-Tags:
HTML:
form {
    background-color: #eaeaea;
    padding: 10px;
     width: 650px;
    -moz-border-radius: 10px;
    -webkit-border-radius: 10px;
    }
Wenn du diese zB auf 150px änderst, wirst du sehen, dass sich was tut.

:)
 
  • Gefällt mir
Reaktionen: obi
Hi, ich wusste doch dass es irgendwas ganz blödes ist.

Vielen Dank!

Brauche das form tag nur bei den Kontaktanfragen in der Form aus dem Css. Sonst brauche ich es immer ohne Formatierung. Werde das ändern, dass es standardmäßig ohne ist.

Anna.
 
Zurück
Oben Unten