HTML question

This forum is where you can show off your art, such as emulator software skins, DVD and CD covers; or discuss other art-related topics.
Post Reply
User avatar
Matisfaction
I can't get no.....
Posts: 3429
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Sat Jul 17, 2004 8:44 pm
Has thanked: 0
Been thanked: 0

HTML question

Post by Matisfaction »

what tags or code do i need to put a background (jpg) in to a table?
User avatar
FETUS
Knight of Null
Knight of Null
Posts: 2938
Joined: Sun Feb 02, 2003 8:21 pm
Location: Large fries
Has thanked: 0
Been thanked: 0
Contact:

Post by FETUS »

in the <body> instead of bgcolor=blablacode just put background="imgurl"
User avatar
Matisfaction
I can't get no.....
Posts: 3429
Joined: Sat Jul 17, 2004 8:44 pm
Has thanked: 0
Been thanked: 0

Post by Matisfaction »

that's what i've been doing, but it's not working maybe it's my coding?

here's the source (i've changed the images and links and from the original)

Code: Select all

<html>
<head>
<BODY BACKGROUND="http://img.photobucket.com/albums/v474/Matisfaction/Background.jpg"> 

	<title>
		Bender
	</title>

	<style>
	* { font-family: verdana; font-size: 10pt; COLOR: black; }
	b { font-weight: bold; }
	table { height: 50%; border: 2px solid black; background: white; }
	td { text-align: center; padding: 25; background:}
	a:link { color: #000000; text-decoration: none; }
	a:active { color: #000000; text-decoration: none; }
	a:visited { color: #CCCCCC; text-decoration: none; }
	a:hover { color: #6699CC; text-decoration: none; }

</style>
</head>
<body>
<center>
<br><br><br><br>
	<table>

	<tr><td>
	<b>"You're full of crap Fry!"</b>
	<BR><BR><BR>
	<div align="center"><IMG SRC="http://img.photobucket.com/albums/v474/Matisfaction/Bender.gif" border=0></div></b>
	<BR><BR>
	<a href="0.html">Home</a> | <a href="1.html">Map</a> | 
<a href="2.html">Gallery</a> | <a href="3.html">links</a> | <a href="4.html">Price List</a> | <a href="5.html">Contact Us</a> 
	</td></tr>
	</table>
</center>
</body>

</html>
User avatar
curt_grymala
Theme Inducer
Theme Inducer
Posts: 4274
Joined: Fri May 30, 2003 12:14 pm
Location: Wherever I'm Needed
Has thanked: 0
Been thanked: 0
Contact:

Post by curt_grymala »

Code: Select all

<table style="background: url('http://img.photobucket.com/albums/v474/Matisfaction/Background.jpg');">
<tr>
<td>This is a test</td>
</tr>
</table>
DCHelp - A Newbie's Best Friend
DC Evolution - Disc Images
DreamZone Forums

I Refuse To Help Anyone That Says They've Tried Everything.
User avatar
Matisfaction
I can't get no.....
Posts: 3429
Joined: Sat Jul 17, 2004 8:44 pm
Has thanked: 0
Been thanked: 0

Post by Matisfaction »

Thanks curt, One more question: i've removed the "%" so that the table doesn't expand when you maximize the browser window. here's an example:

Code: Select all

table { height: 50%; width: 50%; border: 2px solid black; background: white; }
No matter what values i put in i can't change the size of the table now.
Sir Savant
Somewhat Dumb Knight
Posts: 3653
Joined: Tue Oct 12, 2004 2:26 pm
Has thanked: 0
Been thanked: 0

Post by Sir Savant »

I think you have to write "50px" o some such nonsense.
User avatar
curt_grymala
Theme Inducer
Theme Inducer
Posts: 4274
Joined: Fri May 30, 2003 12:14 pm
Location: Wherever I'm Needed
Has thanked: 0
Been thanked: 0
Contact:

Post by curt_grymala »

Yeah. If you want to remove the percentage, you need to change it something like:

Code: Select all

table { height: 200px; width: 450px; border: 2px solid black; background: white; }
You can set width/height in values of "px" - pixels, "in" - inches, "%" - percentage of it's outer container. You can also set font sizes in "pt" - point size.

In addition, if I were you, I would change the "white" to "#fff" or "#fffffff". Hexidecimal color definitions are always more universal than named color values. Also, in order to be completely correct, if you are only going to define a color for the background, then you might want to change it to "background-color" instead of simply "background". It makes things a little cleaner for anyone that views your source.
DCHelp - A Newbie's Best Friend
DC Evolution - Disc Images
DreamZone Forums

I Refuse To Help Anyone That Says They've Tried Everything.
User avatar
Matisfaction
I can't get no.....
Posts: 3429
Joined: Sat Jul 17, 2004 8:44 pm
Has thanked: 0
Been thanked: 0

Post by Matisfaction »

Thanks Curt, i have another problem now. The tables on my site have borders and everything is fine in all browsers EXCEPT the PC version of IE, for some reason intead of the borders being 2px thick they are super thick.

Here's my code:

Code: Select all

<html>
<head>
<BODY>
<title>
      my web site
   </title>

   <style>
   * { font-family: verdana; font-size: 10pt; font-color: #FFFFFF; Background-color: #6699FF; }
    b { font-weight: bold;}
   table { height: 1px; width: 440px; border: 1px;  border-color: #FFFFFF; background: #FFFFFF; }
   td { text-align: center; padding: 15; background:}
   a:link { color: #000000; text-decoration: none; }
   a:active { color: #000000; text-decoration: none; }
   a:visited { color: #FF0000; text-decoration: none; }
   a:hover { color: #FFFF00; text-decoration: none; }
</style>
</head>
<body>
<p>
<br>
<center>
<table>
<tr><td>
<div align="center"><IMG height="37" width="400" border="0"
alt="logo" SRC="my logo" border=0></div>
</td></tr>
   </table>
   <p>
<table>
<tr><td>
<div align="center">
<div align="left"><FONT COLOR="#FFFF00">28/03/06</FONT></div>
<p>
<div align="justify">
<FONT COLOR="#FFFFFF">
This site is currently under construction. The full site will be up shortly, so stay tuned for more updates.
</FONT>
</div>
</td></tr>
   </table>
</center>
</body>
</html>
Post Reply