HTML Code Help

This is a discussion on "HTML Code Help" within the Web Page Design section. This forum, and the thread "HTML Code Help are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jun 28th, 2007, 09:46
Junior Member
Join Date: May 2007
Location: Wales
Age: 19
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
HTML Code Help

Here is my first proper code, its an affiliate box. I coded it from scratch
Code: Select all
<!-- 
Created by (¯`•Stormraven•._) Copyright 2007 
This code may not be redistributed or reposted without permission from the creator. This header must stay intact at all times 
-->
<table width="700" align="center" class="bordercolor" cellpadding="4" cellspacing="1">
<tr>
<td align="center" class="titlebg" colspan="3">
<font size="2"><center><b>Affiliate Centre</b></center></font>
</td>
</tr>
<tr>
<td width="10%" vAlign="top" class="windowbg">
<a href="<A href="http://forums.pbxtras.com"><img">http://forums.pbxtras.com"><img src="http://pbxtras.com/forums/affiliate1.png" border="0"></a>
<a href="URL to Affiliate Thread"><center>Affiliate</center></a>
<td width="40%" class="windowbg2" vAlign="top">
<marquee direction="left" onmouseover="this.stop()" onmouseout="this.start()" scrollamount="3">

<!-- Start of Left Marquee Box -->
<a href="<A href="http://forums.pbxtras.com"><img">http://forums.pbxtras.com"><img src="http://pbxtras.com/forums/affiliate1.png" border="0"></a>
<a href="<A href="http://forums.pbxtras.com"><img">http://forums.pbxtras.com"><img src="http://pbxtras.com/forums/affiliate1.png" border="0"></a>
<a href="<A href="http://forums.pbxtras.com"><img">http://forums.pbxtras.com"><img src="http://pbxtras.com/forums/affiliate1.png" border="0"></a>
<!-- End of Left Marquee Box -->

<td width="40%" class="windowbg2" vAlign="top">
<marquee direction="right" onmouseover="this.stop()" onmouseout="this.start()" scrollamount="3">

<!-- Start of Right Marquee Box -->
<a href="<A href="http://forums.pbxtras.com"><img">http://forums.pbxtras.com"><img src="http://pbxtras.com/forums/affiliate1.png" border="0"></a>
<a href="<A href="http://forums.pbxtras.com"><img">http://forums.pbxtras.com"><img src="http://pbxtras.com/forums/affiliate1.png" border="0"></a>
<a href="<A href="http://forums.pbxtras.com"><img">http://forums.pbxtras.com"><img src="http://pbxtras.com/forums/affiliate1.png" border="0"></a>
<!-- End of Right Marquee Box -->
<td width="10% class="windowbg" vAlign="top">
We are currently <b>accepting</b> affiliates

</marquee>
</td>
</tr>
</table>
If you go and have a look here, look at the bottom of the forum and look at the box on the right of the affiliate table, why is the right cell all black? I cant work it out.
I want the box on the far left and the box on the far right exactly the same size, and the two boxes in the middle where the affiliates are moving want them the same size too.
Also is the html coding ok? Or can it be cleared up a bit :-/
EDIT: Am I aloud to copyright this code to myself, because its only small bit of html?
Reply With Quote

  #2 (permalink)  
Old Jun 28th, 2007, 11:29
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: HTML Code Help

You have 35 errors in code:
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.stormstest.proboards98. com%2F

Some are related to that particular table you are having trouble with. If you fix those errors you'll most likely fix your problem.

You need a doc type too!
Reply With Quote
  #3 (permalink)  
Old Jun 28th, 2007, 14:06
BGarner's Avatar
Reputable Member
Join Date: Oct 2006
Location: In front of the computer.
Posts: 213
Thanks: 0
Thanked 0 Times in 0 Posts
Re: HTML Code Help

It's great that your hand-coding, but I would say if you're just learning, go ahead and start with CSS (Cascading Style Sheets).

I redid your code with CSS it looks like this...

Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>table test</title>

        <meta http-equiv="content-language" content="en" />
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <link rel="stylesheet" type="text/css" media="screen" href="/css/affiliate.css" id="default" title="affiliate css" />

</head>

<body>
<div id="wrapper">

  <h2>Affiliate Centre</h2>
  
  <div class="sidebox">
    <p><a href="http://forums.pbxtras.com"><img src="http://pbxtras.com/forums/affiliate1.png" class="noborder" alt="pbxtras" /></a></p>
    <p class="center"><a href="URL to Affiliate Thread">Affiliate</a></p>
  </div>
  
  <div class="marquee">
    
    <!-- Start of Left Marquee Box -->
    <p><a href="http://forums.pbxtras.com"><img src="http://pbxtras.com/forums/affiliate1.png" class="noborder" alt="pbxtras" /></a></p>
    <!-- End of Left Marquee Box -->
  </div>
  
  <div class="marquee">
    
    <!-- Start of Right Marquee Box -->
    <p><a href="http://forums.pbxtras.com"><img src="http://pbxtras.com/forums/affiliate1.png" class="noborder" alt="pbxtras" /></a></p>
    <!-- End of Right Marquee Box -->
  </div>
  
  <div class="sidebox">
    <p>We are currently <strong>accepting</strong> affiliates.</p>
  </div>

</div>
</body>
</html>
and the CSS file (affiliate.css) looks like this...

Code: Select all
  * {
  margin: 0;
  padding: 0;
  }
  
  h2 {
  text-align: center;
  padding-bottom: 20px;
  }
  
  div#wrapper {
  width: 700px;
  margin: 0 auto;
  }
  
  .marquee {
  width: 250px;
  float: left;
  border: solid 1px #000;
  }
  
  .sidebox {
  width: 90px;
  float: left;
  border: solid 1px #000;
  }
  
  .noborder {
  border: none;
  }
  
  .center {
  text-align: center;
  }
This page can be found at www.thehtmldude.com/table.html

The code validates CSS and XHTML Strict. (I took out the marquees so that it would validate.)

Hope this helps you see what can be done with CSS. Look into it, I think CSS is easier than tables. Some great tuorials are www.w3schools.com and www.htmldog.com

Last edited by BGarner; Jun 28th, 2007 at 14:11.
Reply With Quote
  #4 (permalink)  
Old Jun 28th, 2007, 20:02
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: HTML Code Help

Nice job BGarner! You get the daily post award!
Reply With Quote
  #5 (permalink)  
Old Jul 11th, 2007, 00:20
New Member
Join Date: Jul 2007
Location: My House Lol
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: HTML Code Help

Alot of errors with your code...
Reply With Quote
Reply

Tags
help

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[code], [html], [php] CloudedVision Webforumz Suggestions and Feedback 2 Feb 20th, 2008 23:01
HTML Code - Help Please Anyone? nuddy Starting Out 14 Apr 24th, 2007 10:05
How I convert Html code to pDF vijiljones Web Page Design 2 Oct 11th, 2006 13:57
html code help Aaron1988 Web Page Design 3 Aug 22nd, 2006 09:52
i need an html code... anderson10 Web Page Design 8 Jul 31st, 2006 14:13


All times are GMT. The time now is 21:26.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43