Home of POI and fire twirling Two connected poi - uploaded by fNiMe - uploaded by Captain HazzardMy Temporary Beetle! - uploaded by Captain Hazzard
      

Web development help - navigation bar keeps moving

      
Topic Options
Rate This Topic
#358516 - 16/07/04 11:26 PM Web development help - navigation bar keeps moving
DeepSoulSheep Offline
Carpal \'Tunnel

Registered: 25/09/02
Loc: Berlin
I'm doing my uncle a favour and building a small website for him.

I'm using a table with 2 rows and 2 columns as the main layout.
Top left a logo.
Top right the name
Lower left the navigation bar.
Lower right the main content part.

I'm having a problem I always seems to encounter though and cant get around. In the navigation cell I can't get the navigation bit to stay under the logo because it keeps sliding down the screen as the page gets longer.

I'm beginning to suspect that tables is not the way to do this but I don't have any knowledge of layers and that. Does anyone know what I'm doing wrong or how I can get around this?

Cheers
J
_________________________
I live in a world of infinite possibilities.

Top
#358517 - 17/07/04 12:18 AM Re: Web development help - navigation bar keeps moving [Re: DeepSoulSheep]
Dom Administrator Offline
Carpal \'Tunnel

Registered: 19/12/01
Loc: Bristol, UK
It's basically impossible to say wot's broken without looking at the code. Is there a colspan on any columns?

If you can make the top nav bar of any site a separate table to the content - it'll load quicker and be easier to code.

Top
#358518 - 17/07/04 01:15 AM Re: Web development help - navigation bar keeps moving [Re: Dom]
mech Offline
Carpal \'Tunnel

Registered: 09/06/03
Loc: "In your ear"
as the main table of content gets bigger and longer, the table frame next to it will mirror size and shape, to counter this, if it getting longer, throw empty cells in under your nav table to keeep it in place, like standing stuff under it to make it higher!
_________________________
Step (el-nombrie)

Top
#358519 - 17/07/04 01:42 AM Re: Web development help - navigation bar keeps moving [Re: mech]
DeepSoulSheep Offline
Carpal \'Tunnel

Registered: 25/09/02
Loc: Berlin
</font><blockquote><font class="small">Written by:</font><hr />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
A.imglink{
font : bold 9pt verdana, sans-serif;
color:black;
width:130px;
height:20px;
background:white url(/path/to/off.gif) no-repeat;
text-align:center;
padding-top:2px;
display:block;
text-decoration:none;
}
A.imglink:Hover{
font : bold 10pt verdana, sans-serif;
color:red;
text-decoration:none;
background:blue;

</style>

</head>
<!-- background:white url(/path/to/on.gif) no-repeat -->
<body>
<body>
<table width="100%" height="100%" border="0" bordercolor="#0000CC">
<tr>
<td width="20%" height="112" bgcolor="#0000CC"><img src="Fordfocus.jpg" width="197" height="104"></td>
<td width="80%" bgcolor="#0000CC"><h1>&nbsp;</h1></td>
<tr>
<!-- start of menu table -->
<td bgcolor="#0000CC" width-"20%">
<table align="center" cellpadding=0 cellspacing=0>
<tr>
<td><a href="#" class="imglink">Home</a> </td>
</tr>
<tr>
<td><a href="#" class="imglink">Where are we?</a> </td>
</tr>
<tr>
<td><a href="#" class="imglink">Cars</a> </td>
</tr>
<tr>
<td><a href="#" class="imglink">Finance</a> </td>
</tr>
<tr>
<td><a href="#" class="imglink">Contact us</a> </td>
</tr>
</table>
</td>
<!-- End of menu table -->
<td>
<p>hi</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p></td>
</tr>
</table>
</body></body>
</html>





Yea sorry I probably should've copied the code in here it is. As you can see the nav bar keeps slipping.

Edit: The 2 tables is a good idea but that's going to have the same problem me thinks. I'll try the propping up bit Mech and let you know.

Any other idea's'd be great. Thanks for the help so far


Edited by DeepSoulSheep (17/07/04 01:55 AM)

Top
#358520 - 17/07/04 01:57 AM Re: Web development help - navigation bar keeps moving [Re: DeepSoulSheep]
mech Offline
Carpal \'Tunnel

Registered: 09/06/03
Loc: "In your ear"
try this, just copy and paste into what ever prog you are using,

for expample throw it into d-weaver and it will make th page for you, i have use a set of tables to support teh next table down, not the cleanest code, but im sure you can figure it out

laterdays


Code:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<table width="75%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="42%" height="95">&nbsp;</td>
<td width="58%">&nbsp;</td>
</tr>
<tr>
<td><table width="76%" border="0">
<tr>
<td> <table width="75%" border="0">
<tr>
<td><table width="75%" border="1">
<tr>
<td>Nav</td>
</tr>
<tr>
<td>frame</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table></td>
</tr>
</table></td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>

_________________________
Step (el-nombrie)

Top
#358521 - 17/07/04 01:58 AM Re: Web development help - navigation bar keeps moving [Re: DeepSoulSheep]
Dom Administrator Offline
Carpal \'Tunnel

Registered: 19/12/01
Loc: Bristol, UK
You need valign="top" in the menu table's parent cells and you've got nested tables in there for some reason I can't make out.

Try not to use empty spacer cells or spacer gifs so much - they're messy and a work around so the page could just break again if the content gets longer.

Top
#358522 - 17/07/04 02:00 AM Re: Web development help - navigation bar keeps moving [Re: DeepSoulSheep]
DeepSoulSheep Offline
Carpal \'Tunnel

Registered: 25/09/02
Loc: Berlin
I've tried putting columns in under the navigation bar and it still wont stay under the logo.

table align="center" cellpadding=0 cellspacing=0>
<tr>
<td><a href="#" class="imglink">Home</a> </td>
</tr>
<tr>
<td><a href="#" class="imglink">Where are we?</a> </td>
</tr>
<tr>
<td><a href="#" class="imglink">Cars</a> </td>
</tr>
<tr>
<td><a href="#" class="imglink">Finance</a> </td>
</tr>
<tr>
<td><a href="#" class="imglink">Contact us</a> </td>
</tr>
<tr><td> </td></tr>
<tr><td> </td></tr>
<tr><td> </td></tr>
<tr><td> </td></tr>
<tr><td> </td></tr>
</table>

This seems like a pretty unelegant way of doing this anyway. Can anyone offer me any kind of solution just to have a navigation in the right place. Plleeeeaasseee
_________________________
I live in a world of infinite possibilities.

Top
#358523 - 17/07/04 02:02 AM Re: Web development help - navigation bar keeps moving [Re: DeepSoulSheep]
mech Offline
Carpal \'Tunnel

Registered: 09/06/03
Loc: "In your ear"
ill shut up then
_________________________
Step (el-nombrie)

Top
#358524 - 17/07/04 02:23 AM Re: Web development help - navigation bar keeps moving [Re: mech]
DeepSoulSheep Offline
Carpal \'Tunnel

Registered: 25/09/02
Loc: Berlin
Mech....I posted that before I saw the code you posted. The way I was trying wasn't what you were talking about at all.

I had just spent the last 10 mintues putting the tags back into place on your code cause I thought is was such a cool way of doing it.

Sorry dude unelegent sounds bad....your way is anything but, the way I interpretted it and tried it was crap..... :blush:


Edited by DeepSoulSheep (17/07/04 02:27 AM)

Top
#358525 - 17/07/04 02:25 AM Re: Web development help - navigation bar keeps moving [Re: mech]
ado-p Offline
Pirate Ninja

Registered: 13/05/04
Loc: Galway/Ireland
Written by:


<!-- start of menu table -->
<td bgcolor="#0000CC" width="20%" valign="top">





and bob's your granny

*edited to say that this works on the first piece of code you used above...*

and that while tables are lovely, they are also the enemy of my sanity *goes back to trying to convert triple frame pages into table pages*


Edited by ado-p (17/07/04 02:33 AM)

Top
#358526 - 17/07/04 02:43 AM Re: Web development help - navigation bar keeps moving [Re: ado-p]
ado-p Offline
Pirate Ninja

Registered: 13/05/04
Loc: Galway/Ireland
must compliment mech on indentation, almost a lost art in HTML.

I so cant nest tables properly!!!
_________________________
Love is the law.

Top
#358527 - 21/07/04 06:10 AM Re: Web development help - navigation bar keeps moving [Re: ado-p]
musashii Offline
starring Skippy the green llama

Registered: 14/12/02
Loc: Seattle, WA
dunno if this is what you mean, but check the tables on the sides of this page, and other pages(how the right column images expand to fit the rest of the page), is that what you're looking for?

http://206.180.240.41/aboutUs.aspx

just a quick post, I have an interview to run off to. Might be able to help out more later eh

Top



     Show more..