Change bgcolor of hmains in HTML?
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>
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.
Thanks...will have a look.
cheers
Pardon my asking, but what is an 'hmain'? Is that a typo, or something I don't know about?
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:
Code:
<td colspan="4" height="50" width="780" background=>#HMAINS#</td>
Try this:
Code:
<td colspan="4" height="50" width="780" style="background-color: #FF0000;">#HMAINS#</td>
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???!!!!!
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.
OH! I see.
Change:
Code:
<td colspan="4" height="50" width="780" bgcolor=#FFFFFF">#HMAINS#</td>
to:
Code:
<td colspan="4" height="50" width="780" bgcolor="#FFFFFF">#HMAINS#</td>
You did not have the starting quotes around your bgcolor value.
Thanks...stupid oversight on my part...all sorted now.
thank again
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks