Jump to content

Where are the breaks coming from????


liam1412

Recommended Posts

Can anyone tell me wher the two  breaks are coming from in the following code. I want text along the top of the a table and it seems there are 2 or 3 breaks above the box so the text is hovering a few lines above it.

Ta


[code]<html>
<head>
<title>KlubDeutsch</title>

<STYLE type="text/css">
h1 {font-family:"trebuchet ms";
  font-size:14px;
     color: "#ffffff"}

p {font-family:"trebuchet ms";
font-size:12px;
color: "#ffffff"}

p.lastpost  {font-family:"trebuchet ms";
font-size:11px;
color: "#b5b5b5"}

p.legal {font-family:"trebuchet ms";
font-size:9px;
color: "#b5b5b5"}

p.error {font-family:"trebuchet ms";
font-size:12px;
color: "#ff0000"}

p.header {font-family:"trebuchet ms";
font-size:16px;
font-weight:bold;
color: "#ffffff"}

.header2 {font-family:"trebuchet ms";
font-size:14px;
font-weight:bold;
color: "#b5b5b5"}

.grey {font-family:"trebuchet ms";
font-size:12px;
color: "#b5b5b5"}

a {font-family:"trebuchet ms";
font-size:12px;
color:"#b5b5b5"}
a:hover {color:"#ff0000"}


img {border-color:"#383838"}

.border {border-style:solid;
border-width:2px;
border-color:"#383838"}

.topic {font-family:"trebuchet ms";
font-size:12px;
color:"#565656";
background-color:"#b5b5b5";
border-style:solid;
border-width:2px;
border-color:"#444444";
width:350px;}

.topic_text {font-family:"trebuchet ms";
color:"#565656";
font-size:12px;
background-color:"#b5b5b5";
border-style:solid;
border-width:2px;
border-color:"#444444";
width:500px}
</STYLE>


<script type="text/javascript" language="javascript">

function chgImg(imgField,imgState) {
document[imgField].src = "images/" + imgField + imgState + ".jpg"
}
</script>

<script type="text/javascript">
function AddEmo(tag)
{
var emo=document.forms["form"].elements["text"];
if (document.selection)
{
emo.focus();
var sel = document.selection.createRange();
sel.text = tag
}
else if (emo.selectionStart || emo.selectionStart == '0')
{

   var startPos = emo.selectionStart
   var endPos = emo.selectionEnd
   emo.value = emo.value.substring(0, startPos)
                 + tag
                 + emo.value.substring(endPos, emo.value.length)
}
else {
   emo.value += tag;
 }
}
</script>


</head>

<body bgcolor="#444444">

<table align="center" width="600" cellspacing="5" cellpadding="0" border="0">
<tr>
   <td colspan="6" align="center" width="600" ><img src="images/header2.jpg" width="600" height="80" alt="header" /></td>
</tr>
<tr>
   <td width="100" align="center"><a href="index.php" onmouseover="chgImg('home','On')" onmouseout="chgImg('home','Off')"><img src="images/homeOff.jpg" width="100" border="0" name="home"></a></td>
   <td width="100" align="center"><a href="my_profile.php" onmouseover="chgImg('profile','On')" onmouseout="chgImg('profile','Off')"><img src="images/profileOff.jpg" width="100" border="0" name="profile"></a></td>
   <td width="100" align="center"><a href="news.html" onmouseover="chgImg('news','On')" onmouseout="chgImg('news','Off')"><img src="images/newsOff.jpg" width="100" border="0" name="news"></a></td>
   <td width="100" align="center"><a href="stats.html" onmouseover="chgImg('stats','On')" onmouseout="chgImg('stats','Off')"><img src="images/statsOff.jpg" width="100" border="0" name="stats"></a></td>
    <td width="100" align="center"><a href="gallery.html" onmouseover="chgImg('gallery','On')" onmouseout="chgImg('gallery','Off')"><img src="images/galleryOff.jpg" width="100" border="0" name="gallery"></a></td>
    <td width="100" align="center"><a href="forum_home.php" onmouseover="chgImg('forums','On')" onmouseout="chgImg('forums','Off')"><img src="images/forumsOff.jpg" width="100" border="0" name="forums"></a></td>
</tr>
</table>

<?php
session_start();
include 'header.html';

if(empty($_SESSION['username']))
{
echo '<p class="grey" align="center">You need to be logged to add a topic. Please <a href="login.php"><b>Log In</b></a> here.
 If you are not laready a member <a href="register1.php"><b>Click Here</b></a> to register.</p>';
}else{
$forum_id = $_GET['forum_id'];
?>
[/code]
I wnat to place a line of text along the top of this table but it is going two or three lines above the table. is there something that's adding breaks that I can't see. Am I just going blind/loopy

[code]
<table class="border" align="center" width="600" cellspacing="3" cellpadding="0" border="0" bgcolor="#565656">
<tr>
<td rowspan="6" width="50" align="center" valign="top"><br /></td>
<td class="header2" colspan="2" width="500"><br />Subject:</td>
<td rowspan="6" width="50"><br /></td>
</tr>
<tr>
<form name="form" id="form" action="add_topic_func.php?forum_id=<?php echo $forum_id;?>" method="post">
<td class="grey" colspan="2" width="500"><input class="topic" type="text" name="topic" id="topic" size="55" max length="45"></td>
</tr>
<tr>
<td class="header2" colspan="2" width="500">Comment:</td>
</tr>
<tr>
<td class="grey" colspan="2" width="500"><textarea class="topic_text" name="text" id="text" rows="12" cols="57"></textarea></td>
<br />
<br />

</tr>
<tr>
<td colspan="2" width="500">
<img src="images/smilies/smile.gif" onclick="AddEmo('::smile::')">&nbsp;&nbsp;
<img src="images/smilies/smirk.gif" onclick="AddEmo('::smirk::')">&nbsp;&nbsp;
<img src="images/smilies/wink.gif" onclick="AddEmo('::wink::')">&nbsp;&nbsp;
<img src="images/smilies/cool.gif" onclick="AddEmo('::cool::')">&nbsp;&nbsp;
<img src="images/smilies/sad.gif" onclick="AddEmo('::sad::')">&nbsp;&nbsp;
<img src="images/smilies/mad.gif" onclick="AddEmo('::mad::')">&nbsp;&nbsp;
<img src="images/smilies/rolleyes.gif" onclick="AddEmo('::rolleyes::')">&nbsp;&nbsp;
<img src="images/smilies/surprised.gif" onclick="AddEmo('::surprised::')">&nbsp;&nbsp;
<img src="images/smilies/thinking.gif" onclick="AddEmo('::thinking::')">&nbsp;&nbsp;
<img src="images/smilies/tongue.gif" onclick="AddEmo('::tongue::')">&nbsp;&nbsp;
</td>
</tr>
<tr>
<td colspan="2" width="500"><input type="reset">&nbsp;<input type="submit" value="Add Topic"><br /><br /></td>
</form>
</tr>
</table>


<?php
};
include 'footer.php';
?>

Sorry about all the code I just thought maybe it's something i don't expect.

thanks
[/code]
Link to comment
https://forums.phpfreaks.com/topic/34436-where-are-the-breaks-coming-from/
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.