website border

T

Tristian

Guest
I'm creating a template so i can get more familor with HTML and i ran across something that i still don't know how to do.

You have your logo centered on the page, 650 pixels wide and 150 pixels tall, and now you want a border running down each side of the page, right next to the logo. So far i have this:

Code:
<html>
   <head>
      <title></title>
   </head>
   <body topmargin="0" bgcolor="#000000" text="8d7f74" link="ddc783" vlink="ddc783">
      <table border="0" width="650" height="650" cellpadding="0" cellspacing="0" bgcolor="1f1a13">
         <table border="0" width="650" align="center">
            <tr bgcolor="1f1a13">
               <td height="22" background="images/border_top.jpg"></td>
            </tr>
            <tr bgcolor="1f1a13">
               <td><img width="650" height="150" src="images/banner.jpg"></td>
            </tr>
            <tr bgcolor="1f1a13">
               <td height="80" background="images/navbar.jpg"></td>
            </tr>
            <tr bgcolor="1f1a13">
               <td>text</td>
            </tr>
            <tr bgcolor="1f1a13">
               <td height="22" background="images/border_top.jpg"></td>
            </tr>
         </table>
      </table>
   </body>
</html>

As you can see, i already have a border on the top that works great, same with the bottom border (even though it says border_top, i use for the bottom anyway)! The navigation bar is still being worked on, so may pictures..., and the content part im waiting to do untill i get all the borders done.

The src's for the borders are:
Left border: src="images/border_left.jpg"
Right border: src="images/border_right.jpg"

(Just because I know that acually having what they need is helpful cause you don't have to make it up ;))
 

Chile

The All Purpose Administrator
Reaction score
10
try this:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
            "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
</head>
<body topmargin="0" bgcolor="#000000" text="8d7f74" link="ddc783" vlink="ddc783">
<table border="0" width="670" height="650" cellpadding="0" cellspacing="0" bgcolor="1f1a13">
<tr>
<td height="100%" width="10px" style="background-image:url('images/border_left.jpg');">&nbsp;</td>
<td width="650">
<table border="0" width="650" align="center">
            <tr bgcolor="1f1a13">
               <td height="22" background="images/border_top.jpg"></td>
            </tr>
            <tr bgcolor="1f1a13">
               <td><img width="650" height="150" src="images/banner.jpg"></td>
            </tr>
            <tr bgcolor="1f1a13">
               <td height="80" background="images/navbar.jpg"></td>
            </tr>
            <tr bgcolor="1f1a13">
               <td>text</td>
            </tr>
            <tr bgcolor="1f1a13">
               <td height="22" background="images/border_top.jpg"></td>
            </tr>
         </table>
</td>
<td height="100%" width="10px" style="background-image:url('images/border_right.jpg');">&nbsp;</td>
</tr>
      </table>
   </body>
</html>

A few things to point out.

- You should declare what version of html you are using in the DTD comment.
- If you are going to nest tables inside another table, don't forget to add the table row <tr> and table cell <td> tags.
- consider using an external .css document to add backgrounds or borders you'll use frequently (saves a LOT of time when you want to change things later on).
 
T

Tristian

Guest
Some1 suggested to me to use CSS. The thing is, i dont know a thing of CSS. So how would that help?
 

Chile

The All Purpose Administrator
Reaction score
10
The html I provided you with creates a 10 pixel border on either side of the logo and down the page.
 
T

Tristian

Guest
yea but it didnt work, let me take a screen shot of what happened.
 
T

Tristian

Guest
Here is the pic with your source code, the borders are just black.

(I found how to get a color border on my page: http://warsucks.t35.com/index.htm But getting my borders that i want would be great!)

websitepic.jpg
 

Chile

The All Purpose Administrator
Reaction score
10
It works

But, I have no idea where your side borders are- I used some parchment I was working on for borders in the example below and widened the <td>'s to 20 pixels.

http://www.rpgstars.com/tristian/

cheers!
Chile
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top