Jump to content
MakeWebGames

Recommended Posts

Posted

how would i add a background image to this table instead of a background color

 

echo '<table width=100%><tr align=center bgcolor=firebrick><td align=center><font color=white>Profile</td></tr><tr bgcolor=white></table>';

Posted

Not sure if the background attribute is deprecated or not , didn't checked while posting this

so if it's a deprecated attribute you can also use CSS for this

[css]<STYLE TYPE="text/css">

<!--

.myimage, .myimage TD, .myimage TH

{

background-image: url('myimage.jpg');

background-color:#0000FF;

color:#FFFFFF;

font-family: sans-serif;

font-weight:600;

}

-->

</STYLE>[/css]

 

<TABLE CLASS="myimage">

 

This would also solve the issue of text not showing up clearly in a table using background, in this example I used white as text color and background color blue

More info at http://www.w3.org/TR/CSS2/tables.html#table-layers

Posted

print "

<style type='text/css'>

<!--

body {background-image:url('2.jpg')}

background-repeat:no-repeat;

//-->

</style>

</script>";

use the repeat / no repeat to choose weither or not is shows more then once if you have a pic too small for the page it will try to repeat,

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...