Page 2 of 2

Posted: Tue Jul 08, 2003 5:28 am
by Gappa
Hmm the HTML code checker this doesnt seem to be working becuase its a php file... I, dunno, maybe im using the wrong code checker thingy

Posted: Tue Jul 08, 2003 8:57 am
by DuFF
Does it give you an error? Make sure you have the correct doctype or it will not know how to check it. Make this the first line of HTML:

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Posted: Tue Jul 08, 2003 7:28 pm
by Gappa
Well its a php doc.... with html in it

Gives me this message...

I was not able to extract a character encoding labeling from any of the valid sources for such information. Without encoding information it is impossible to validate the document. The sources I tried are:

The HTTP Content-Type field.
The XML Declaration.
The HTML "META" element.
And I even tried to autodetect it using the algorithm defined in Appendix F of the XML 1.0 Recommendation.

Since none of these sources yielded any usable information, I will not be able to validate this document. Sorry. Please make sure you specify the character encoding in use.

Posted: Tue Jul 08, 2003 8:09 pm
by freshyweb
Okay, I think I've figured it out.

It's not an HTML or PHP issue, but rather a CSS issue.

First try changing the code in your header:

<head>
<style tye="text/css">
body {
background-color: #666666;
}
</style>
<title>Reminisce.tk :: Home of the Wrangler</title>
</head>


to this:


<head>
<style tyPe="text/css">
body {
background-color: #666666;
}
.tdbackground {background-image: url(right2.gif); background-repeat: no-repeat; background-position: top right}
</style>
<title>Reminisce.tk :: Home of the Wrangler</title>
</head>

NOTE: I have capitalized the "P" in the style tyPe portion so you will add it. It was missing in your original code, hence the white on white problem w/the text.

Then assign class="tdbackground" to the TD that uses the background image (2nd table, 1st row, 3rd cell) and remove the background="right2.gif".

I believe the problem is that you are allowing the browser to define the TD in your table, even though you have specified the HEIGHT attribute. Then when you populate the actual Forum Posts using your PHP and the TD that contains the bgimage exceeds the defined HEIGHT, then the bgimage repeats.

The CSS code above formats the behavior of the TD bgimage so it behaves appropriately in most situations.

Another fix is to just load the actual image into the appropriate cell instead of making it a background image.

I haven't actually tested the above code for syntax or it's resolution to your problem, but really think this is the solution.

Let me know if it works or not.

Posted: Wed Jul 09, 2003 12:58 am
by Gappa
Actually where i add the P or not doesnt really make a difference, I told the text to be white. (will change that later), going to test now.. thanks

UPDATE: Still repeats :(

Posted: Wed Jul 09, 2003 10:12 am
by freshyweb
Okay, I see that it didn't work, but I checked the source code on your page and noticed that you did in fact change the CSS code in the header, but you didn't change the actual HTML in the TD to use the CSS:

Code: Select all

<td width="300" height="400" background="right2.gif"></td>
to:

Code: Select all

<td width="300" height="400" class="tdbackground"></td>
Try that and see if it works.

Posted: Thu Jul 10, 2003 11:02 pm
by Gappa
Ahh kool, kinda works better but it has played some how with the appearance of the actual background image :S ... you can by looking at it that its NQR http://www.hostultra.com/~Gappa/index.php

Posted: Thu Jul 10, 2003 11:22 pm
by freshyweb
Yeah, that's the problem with using background images in a TD. They don't hold the TD to a fixed width/height to hold them. Instead they get cropped.

What works best to get the size you want is to put a spacer image (like pixel.gif on your site) into the TD and set the width and height of the spacer image to be the exact size you need to display the whole background image.

Hope tweaking it will solve your problem. It'll work for you.