Jump to content

Width problems


rebelcreek

Recommended Posts

Hello I need help with a width issue I made a addnews page and it all works great but on my main page the widths limits are pretty short 200px and everytime i post something it exceeds that and screws up the website can you help where do I add the limits? on the front page coding?

<?
include("*****.inc");
$getnews = mysql_query("select * from news ORDER BY id DESC LIMIT 1 ");
while($r=mysql_fetch_array($getnews)){
extract($r);
echo("<p><b><i>$title <br/> $date</p></b></i>$news<br><br><br><br>");

}
?>

 

The addnews?

<form action="submit.php" method="post">
<b>Title</b>
<BR />
<input type="text" name="title" size="40" maxlength="80" value="Enter Title Here" />
<br />
<br />
<b>News</b><BR><textarea rows="5" cols="40" name="news" id="news" 
onKeyDown="textCounter(this,'progressbar1',150)" 
onKeyUp="textCounter(this,'progressbar1',150)" 
onFocus="textCounter(this,'progressbar1',150)"></textarea><br />

<div id="progressbar1" class="progress"></div>

<script>textCounter(document.getElementById("maxcharfield"),"progressbar1",150)</script>



<br />
<br />
<input type="submit" value="Submit" /> <input type="reset" value="Reset" />
</form>

 

or in the submitt file

 

<?
//grabs the variables
$news = $_POST["news"];
$title = $_POST["title"];
//gets mysql info
include("******.inc");
//gets the current date...
$date = date("m/d/Y h:i A");
$addnews =MYSQL_QUERY("INSERT INTO news (id,title,date,news)". "VALUES ('NULL', '$title', '$date', '$news')");
//success...
echo("");
?>

 

Thank for the help

Link to comment
https://forums.phpfreaks.com/topic/227574-width-problems/
Share on other sites

your frontpage code would handle this by attaching a stylesheet, but if not we will need more of the front page coding.

 

you could always wrap news in a DIV tag;

 

<div class='news'>$news</div>

 

and assign its variables in a seperate style sheet as follows;

 

.news{ 
  width: 100%;
  padding: 0;
  text-align: left;
} 

Link to comment
https://forums.phpfreaks.com/topic/227574-width-problems/#findComment-1173991
Share on other sites

Tried this no help here is the whole front page code

 

<html>
<head>
<title>Rebel Creek</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<style type="text/css">
#Table_01 tr td {
font-size: 12px;
}
#Table_01 tr td {
font-family: "Times New Roman", Times, serif;
}
.news{ 	  
     width: 205px;	  padding: 0;	  text-align: left;
}
</style>
</head>
<body bgcolor="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<!-- Save for Web Slices (Rebel Creek.psd) -->
<center><table id="Table_01" width="901" height="790" border="0" cellpadding="0" cellspacing="0">
<tr>
	<td rowspan="22">
		<img src="images/frame1.gif" width="93" height="789" alt=""></td>
	<td rowspan="22">
		<img src="images/index_02.jpg" width="17" height="789" alt=""></td>
	<td colspan="29">
		<img src="images/title.gif" width="661" height="66" alt=""></td>
	<td colspan="4">
		<img src="images/frame2.gif" width="129" height="66" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="66" alt=""></td>
</tr>
<tr>
	<td colspan="13">
		<img src="images/dl.gif" width="219" height="1" alt=""></td>
	<td colspan="17" rowspan="2">
		<img src="images/top.gif" width="444" height="32" alt=""></td>
	<td colspan="3" rowspan="18">
		<img src="images/frame2-08.gif" width="127" height="696" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="1" alt=""></td>
</tr>
<tr>
	<td colspan="3">
		<img src="images/dl-09.gif" width="27" height="31" alt=""></td>
	<td colspan="5" rowspan="4">
		<a href="cart">
		  <img src="images/Store.gif" width="133" height="109" border="0" alt=""></a></td>
	<td colspan="5">
		<img src="images/dl-11.gif" width="59" height="31" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="31" alt=""></td>
</tr>
<tr>
	<td colspan="3" rowspan="4">
		<img src="images/index_11.jpg" width="27" height="141" alt=""></td>
	<td colspan="3" rowspan="4">
		<img src="images/index_12.jpg" width="41" height="141" alt=""></td>
	<td colspan="7">
		<a href="Bio">
			<img src="images/Aboutus.jpg" width="113" height="45" border="0" alt="About Rebel Creek"></a></td>
	<td colspan="2">
		<a href="Music">
			<img src="images/Music.jpg" width="67" height="45" border="0" alt="Music"></a></td>
	<td colspan="4">
		<a href="Tour">
			<img src="images/Showdates.gif" width="118" height="45" border="0" alt="Rebel Creek Show Dates"></a></td>
	<td colspan="2">
		<a href="Videos">
			<img src="images/Videos.gif" width="70" height="45" border="0" alt="Rebel Creek Videos"></a></td>
	<td colspan="2">
		<a href="Photo">
			<img src="images/Photo.gif" width="84" height="45" border="0" alt="Images Of Rebel Creek"></a></td>
	<td rowspan="2">
		<img src="images/index_18.jpg" width="8" height="46" alt=""></td>
	<td rowspan="2">
		<img src="images/frame2-20.gif" width="2" height="46" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="45" alt=""></td>
</tr>
<tr>
	<td colspan="17">
		<img src="images/index_20.jpg" width="452" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="1" alt=""></td>
</tr>
<tr>
	<td colspan="2" rowspan="2">
		<img src="images/index_21.jpg" width="18" height="95" alt=""></td>
	<td colspan="17" rowspan="2">
		<img src="images/main.gif" width="444" height="95" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="32" alt=""></td>
</tr>
<tr>
	<td colspan="5">
		<img src="images/index_23.jpg" width="133" height="63" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="63" alt=""></td>
</tr>
<tr>
	<td colspan="2" rowspan="5">
		<img src="images/index_24.jpg" width="16" height="414" alt=""></td>
	<td bgcolor="#FFFFFF" border"0" colspan="12" width="205" height="160" >
<?
include("********.inc");
$getnews = mysql_query("select * from news ORDER BY id DESC LIMIT 1 ");
while($r=mysql_fetch_array($getnews)){
extract($r);
echo("<p><b><i>$title <br/> $date</p></b></i><div class='news'>$news</div>

<br><br><br><br>");

}
?></td>
	<td colspan="16" rowspan="6">
		<img src="images/main-27.gif" width="442" height="425" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="160" alt=""></td>
</tr>
<tr>
	<td colspan="11">
		<img src="images/index_27.jpg" width="203" height="29" alt=""></td>
	<td>
		<img src="images/main-29.gif" width="2" height="29" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="29" alt=""></td>
</tr>
<tr>
	<td bgcolor="FFFFFF" border"0" colspan="12">
<script>
new TWTR.Widget({
  version: 2,
  type: 'search',
  search: 'Rebel_Creek',
  interval: 5000,
  title: '',
  subject: '',
  width: 205,
  height: 142,
  theme: {
    shell: {
      background: '#ffffff',
      color: '#000000'
    },
    tweets: {
      background: '#ffffff',
      color: '#444444',
      links: '#1985b5'
    }
  },
  features: {
    scrollbar: false,
    loop: true,
    live: true,
    hashtags: true,
    timestamp: true,
    avatars: true,
    toptweets: true,
    behavior: 'default'
  }
}).render().start();
</script></td>
	<td>
		<img src="images/spacer.gif" width="1" height="209" alt=""></td>
</tr>
<tr>
	<td colspan="11">
		<img src="images/index_30.jpg" width="203" height="14" alt=""></td>
	<td rowspan="3">
		<img src="images/main-32.gif" width="2" height="27" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="14" alt=""></td>
</tr>
<tr>
	<td colspan="5">
		<img src="images/index_32.jpg" width="98" height="2" alt=""></td>
	<td colspan="2" rowspan="4">
		<a href="http://twitter.com/Rebel_Creek" target="_self"
			onmouseover="window.status='Follow us on Twitter';  return true;"
			onmouseout="window.status='';  return true;">
			<img src="images/Twitter.jpg" width="48" height="58" border="0" alt=""></a></td>
	<td colspan="4" rowspan="5">
		<img src="images/index_34.jpg" width="57" height="71" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="2" alt=""></td>
</tr>
<tr>
	<td rowspan="10">
		<img src="images/index_35.jpg" width="9" height="136" alt=""></td>
	<td colspan="4" rowspan="3">
		<a href="http://www.myspace.com/therebelcreek" target="_Self"
			onmouseover="window.status='MySpace';  return true;"
			onmouseout="window.status='';  return true;">
			<img src="images/MySpace.gif" width="52" height="56" border="0" alt=""></a></td>
	<td colspan="2" rowspan="3">
		<a href="http://www.facebook.com/pages/Rebel-Creek/113243295389590" target="_Self"
			onmouseover="window.status='Facebook';  return true;"
			onmouseout="window.status='';  return true;">
			<img src="images/Facebook_01.gif" width="53" height="56" border="0" alt=""></a></td>
	<td>
		<img src="images/spacer.gif" width="1" height="11" alt=""></td>
</tr>
<tr>
	<td colspan="16">
		<img src="images/index_38.jpg" width="442" height="9" alt=""></td>
	<td rowspan="9">
		<img src="images/frame2-40.gif" width="2" height="125" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="9" alt=""></td>
</tr>
<tr>
	<td colspan="2" rowspan="2">
		<img src="images/index_40.jpg" width="8" height="49" alt=""></td>
	<td colspan="7"><a href="email/?p=subscribe&id=1"><img src="images/index_41.jpg" width="192" height="36" border="0" alt="Join our Newletter"></a></td>
	<td colspan="7" rowspan="2">
		<img src="images/index_42.jpg" width="242" height="49" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="36" alt=""></td>
</tr>
<tr>
	<td colspan="8">
		<img src="images/index_43.jpg" width="153" height="13" alt=""></td>
	<td colspan="7">
		<img src="images/index_44.jpg" width="192" height="13" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="13" alt=""></td>
</tr>
<tr>
	<td colspan="3" rowspan="6">
		<img src="images/index_45.jpg" width="49" height="67" alt=""></td>
	<td colspan="2">
		<a href="http://www.rebelcreek.net"
			onmouseover="window.status='Home';  return true;"
			onmouseout="window.status='';  return true;">
			<img src="images/Home.jpg" width="52" height="29" border="0" alt=""></a></td>
	<td colspan="4">
		<a href="Bio"
			onmouseover="window.status='About Us';  return true;"
			onmouseout="window.status='';  return true;">
			<img src="images/About-Us.gif" width="59" height="29" border="0" alt=""></a></td>
	<td colspan="2">
		<a href="Music"
			onmouseover="window.status='Music';  return true;"
			onmouseout="window.status='';  return true;">
			<img src="images/Music.gif" width="47" height="29" border="0" alt=""></a></td>
	<td colspan="5">
		<a href="Videos">
			<img src="images/Videos-50.gif" width="51" height="29" border="0" alt="Rebel Creek Videos"></a></td>
	<td colspan="2">
		<a href="Tour">
			<img src="images/Tour.gif" width="79" height="29" border="0" alt="Rebel Creek Show Dates"></a></td>
	<td colspan="2">
		<a href="Book">
			<img src="images/Book.gif" width="63" height="29" border="0" alt="Book Rebel Creek"></a></td>
	<td colspan="3">
		<a href="Photo">
			<img src="images/Photo.jpg" width="90" height="29" border="0" alt="Images Of Rebel Creek"></a></td>
	<td>
		<a href="News">
			<img src="images/News-54.gif" width="42" height="29" border="0" alt="Latest News For Rebel Creek"></a></td>
	<td colspan="2">
		<a href="Contact"
			onmouseover="window.status='Contact us';  return true;"
			onmouseout="window.status='';  return true;">
		  <img src="images/Contact-Us.gif" width="74" height="29" border="0" alt=""></a></td>
	<td colspan="2" rowspan="6">
		<img src="images/index_55.jpg" width="46" height="67" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="29" alt=""></td>
</tr>
<tr>
	<td colspan="23">
		<img src="images/index_56.jpg" width="557" height="3" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="3" alt=""></td>
</tr>
<tr>
	<td colspan="12" rowspan="4">
		<img src="images/index_57.jpg" width="194" height="35" alt=""></td>
	<td colspan="7" rowspan="2">
		<a href="#"
			onmouseover="window.status='Copyrights';  return true;"
			onmouseout="window.status='';  return true;">
			<img src="images/copyright.gif" width="198" height="22" border="0" alt="This website and its content is copyright of Rebel Creek - ©Rebel Creek 2010-11. All rights reserved"></a></td>
	<td colspan="4" rowspan="4">
		<img src="images/index_59.jpg" width="165" height="35" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="8" alt=""></td>
</tr>
<tr>
	<td rowspan="3">
		<img src="images/frame2-61.gif" width="42" height="27" alt=""></td>
	<td rowspan="2">
		<a href="Private" target="_Self">
			<img src="images/Private.jpg" width="84" height="21" border="0" alt="For Band Members Only"></a></td>
	<td rowspan="3">
		<img src="images/frame2-63.gif" width="1" height="27" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="14" alt=""></td>
</tr>
<tr>
	<td colspan="7" rowspan="2">
		<img src="images/index_63.jpg" width="198" height="13" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="7" alt=""></td>
</tr>
<tr>
	<td>
		<img src="images/frame2-65.gif" width="84" height="6" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="6" alt=""></td>
</tr>
<tr>
	<td>
		<img src="images/spacer.gif" width="93" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="17" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="9" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="7" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="11" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="31" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="3" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="49" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="4" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="46" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="2" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="7" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="32" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="15" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="3" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="2" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="6" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="25" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="15" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="47" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="32" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="35" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="28" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="10" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="31" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="49" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="42" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="28" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="46" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="38" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="8" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="2" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="42" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="84" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="1" height="1" alt=""></td>
	<td></td>
</tr>
</table></center>
<!-- End Save for Web Slices -->
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/227574-width-problems/#findComment-1174044
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.