Click to See Complete Forum and Search --> : Change bgcolor of hmains in HTML?


BarberR1
08-20-2009, 09:33 AM
Hi, I need to change the background color of the hmains and have tried various solutions that don't work. Any pointers would be gratefully recieved. Code pasted below:

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<title>Image Cutter Output File</title>
<link rel="stylesheet" type="text/css" href="custom.css">
</head>

<body>
<div align="center">
<center>
<td colspan="4" height="50" width="780" background=>#HMAINS#</td>
<tr>
<table border="0" cellspacing="0" cellpadding="0" height="64" width="395">
<tr>
<td height="64" width="395"><img src="ttlogo1.jpg" height="64" width="395" border="0"></td>
</tr>
<table border="0" cellspacing="0" cellpadding="0" height="41" width="208">
<tr>
<td height="41" width="208"><img src="ttlogo2.gif" height="41" width="208" border="0"></td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
</tr>
<tr>
<td width="100%">
<p class="sohotext">#CONTENT#</td>
</tr>
</table>
</div>
</td>
<td valign="top" align="left" width="160" background="ttvsub.gif">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="160">
<tr>
<td width="100%">#VSUBS#</td>
</tr>
</tr>
</table>
</div>
</td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
</body>
</html>

kiwibrit
08-20-2009, 10:10 AM
It is a nightmare trying to unscramble that code. I would try coding in Notepad rather than using FrontPage which is notorious for the code it produces. If you wish to use an WYSYWIG editor, Dreamweaver is reasonable - HTML Kit is free IIRC, and also quite reasonable.

BarberR1
08-20-2009, 10:25 AM
Thanks...will have a look.
cheers

multimediocrity
08-21-2009, 01:43 AM
Pardon my asking, but what is an 'hmain'? Is that a typo, or something I don't know about?

multimediocrity
08-21-2009, 01:45 AM
Oh, I see. HMAINS is something in your content. I was thinking you were referring to a tag name.

What might work is this. Currently, you have this code:
<td colspan="4" height="50" width="780" background=>#HMAINS#</td>

Try this:

<td colspan="4" height="50" width="780" style="background-color: #FF0000;">#HMAINS#</td>

BarberR1
08-21-2009, 05:11 AM
Thanks for the help. I added in:

<table border="0" cellspacing="0" cellpadding="0" height="50" width="780">
<tr>
</tr>
<tr>
<td colspan="4" height="50" width="780" bgcolor=#FFFFFF">#HMAINS#</td>

and its worked apart from the colour codes which aren't matching up?! Eg. #FFFFFF (white) comes up as bright yellow???!!!!!

multimediocrity
08-21-2009, 11:44 AM
Ok, this might be because of a few things:

First, use style. It's better because it uses CSS.
It may have conflicting CSS which sets your td element to bright yellow.
You may not have typed six F's in the color line. Typing more or fewer will throw off the color.

Try using a color name (like "white") and see if that helps.

multimediocrity
08-21-2009, 11:45 AM
OH! I see.

Change:

<td colspan="4" height="50" width="780" bgcolor=#FFFFFF">#HMAINS#</td>

to:

<td colspan="4" height="50" width="780" bgcolor="#FFFFFF">#HMAINS#</td>

You did not have the starting quotes around your bgcolor value.

BarberR1
08-24-2009, 10:33 AM
Thanks...stupid oversight on my part...all sorted now.

thank again