ثابت کردن سایز جدول برای به هم نریختن جدول

MIMi King

Member
من می خواهم سایز جدولی رو که در صفحه دارم را ثابت کنم تا وقتی مقداری از پایگاه داده به جدول می آید و از انداره عرض جدول بیشتر است به سطر پایین برود و جدول را از لحاظ عرض بزرگ نکند
چطور می توانم این کار را بکنم.
از هم می گم متن، نه عکس!
عکس را ضمیمه کردم.
 

پیوست ها

  • 1.jpg
    1.jpg
    127.5 کیلوبایت · بازدیدها: 11

E-Boy

کاربر فعال انجمن طراحی وب سایت
سلام دوست عزیز .
خسته نباشید .
لطفا اگر امکانش هست خروجی اچ تی ام ال رو در اینجا قرار بدین .
موفق باشید .
 

atk

Active Member
فكر كنم درست شده باشه:
PHP:
<?php require_once('Connections/localhost.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$maxRows_Recordset1 = 10;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
  $pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;

mysql_select_db($database_localhost, $localhost);
$query_Recordset1 = "SELECT * FROM news ORDER BY news.ID DESC";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $localhost) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);

if (isset($_GET['totalRows_Recordset1'])) {
  $totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
  $all_Recordset1 = mysql_query($query_Recordset1);
  $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;

mysql_select_db($database_localhost, $localhost);
$query_Recordset2 = "SELECT * FROM news ORDER BY news.ID DESC";
$Recordset2 = mysql_query($query_Recordset2, $localhost) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);
?>
<!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>Untitled Document</title>
<style type="text/css">
<!--
#apDiv1 {
	position:absolute;
	width:248px;
	height:536px;
	z-index:1;
	left: 13px;
	top: 208px;
}
#apDiv2 {
	position:absolute;
	width:495px;
	height:277px;
	z-index:2;
	left: 263px;
	top: 212px;
}
#apDiv3 {
	position:absolute;
	width:248px;
	height:536px;
	z-index:1;
	left: 759px;
	top: 208px;
}
#apDiv4 {
	position:absolute;
	width:475px;
	height:297px;
	z-index:1;
	left: 12px;
	top: 11px;
}
#apDiv2 #apDiv4 div {
	font-family: tahoma;
}
#apDiv2 #apDiv4 div {
	font-family: tahoma;
}
#apDiv5 {
	position:absolute;
	width:476px;
	height:49px;
	z-index:2;
	left: 17px;
	top: 197px;
}
#apDiv6 {	position:absolute;
	width:475px;
	height:45px;
	z-index:1;
	left: 12px;
	top: 11px;
}
#apDiv2 #apDiv5 div p {
	font-family: tahoma;
}
.ad {
	font-family: tahoma;
	font-size: 16px;
	font-style: normal;
	line-height: 0.5;
	font-weight: normal;
	font-variant: normal;
	text-align: right;
	vertical-align: top;
	text-indent: 1px;
}
.style6 {
	direction: rtl;
	margin-left: 0px;
}
.style7 {
	text-align: right;
	font-family: Tahoma;
}
.style8 {
	direction: rtl;
}
.style9 {
	text-align: right;
}
-->
</style>
</head>

<body>
<div align="justify"><img src="images/sahakian.gif" width="994" height="121" /><div id="layer2" class="style6" dir="rtl" style="position: absolute; width: 493px; height: 293px; z-index: 3; left: 264px; top: 462px">
  <table bgcolor="#99CCFF" style="width: 100%; height: 294px">
		<tr>
			<td class="style7" valign="top"><p>مطالب قبلی</p>
			  <p>
			    <?php do { ?>
	              <a href="view.php?id=<?php echo $row_Recordset1['ID']; ?>"><?php echo $row_Recordset1['Title']; ?><br />
	              </a>
	              <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
			    <br>
          </p></td>
	  </tr>
	</table>
  <br></div>
	<img height="38" src="images/1.gif" width="997">
  <div id="apDiv1" style="left: 13px; top: 178px">
	  <img alt="" height="533" src="images/3.gif" width="242"><div id="layer3" style="position: absolute; width: 517px; height: 280px; z-index: 1; left: 251px; top: 1px">
		  <div id="layer4" class="style8" style="position: absolute; width: 485px; height: 250px; z-index: 1; left: 4px; top: 21px">
			  <table style="width: 100%">
				  <tr>
					  <td style="height: 24px"><?php echo $row_Recordset2['Title']; ?></td>
				  </tr>
				  <tr>
					  <td class="style9" dir="rtl" style="height: 156; width: 475px" valign="top"><?php echo $row_Recordset2['Intro']; ?></td>
				  </tr>
				  <tr>
					  <td>ادامه مطلب|تاریخ:<?php echo $row_Recordset2['Date']; ?>|<span lang="fa">نویسنده:<?php echo $row_Recordset2['Sender']; ?></span></td>
				  </tr>
			  </table>
				</div>
				<img alt="" height="273" src="images/2.gif" width="495"></div>
		</div>
</div>
<div id="apDiv3" style="left: 759px; top: 176px"><img src="images/3.gif" alt="" width="242" height="533" /></div>
</body>
</html>
<?php
mysql_free_result($Recordset1);

mysql_free_result($Recordset2);
?>

يا علي
 

MIMi King

Member
متاسفانه درست نشده.
این هم خروجی اچ تی ام ال:
 

پیوست ها

  • CODE1.txt
    8.8 کیلوبایت · بازدیدها: 4

جدیدترین ارسال ها

بالا