View Full Version : Question about Div tags


camomiletea
11-03-2003, 10:26 PM
I would like to have a div at the bottom of the page (that would contain a link to go to the top of the page). Is it possible to specify it? Here's the code that I use, and it just doesn't work... I'm trying to figure out if it's the problem with this code, or maybe I should check the rest of my coding.

<div id=gotop style="position:absolute; bottom:5; left:20; width:210; padding:5px; border: #009900 5px solid; background-color:#000000;">
<FONT FACE="Verdana,Arial,Helvetica" SIZE="2">
<A HREF="#top">&gt; Top of the page</A><BR>
</FONT>
</div>

jazzberry
11-03-2003, 11:35 PM
are you sure you have a <a name="top"></a> where you want the link to back to?

oh and this part
id=gotop
should have "" and should be

id="gotop" :)

camomiletea
11-04-2003, 01:25 AM
Originally posted by jazzberry
are you sure you have a <a name="top"></a> where you want the link to back to?

oh and this part
id=gotop
should have "" and should be

id="gotop" :)

Thank you for suggestions. I had added the quotes, it didn't work. Yes, I do have <a name="top"></a> right after the opening body tag.

The problem is that the div content doesn't show up at all on the page. I think it should have showed up even if the link was not valid...

Ok, more details. I didn't think they were needed at first, but I cannot figure it out on my own, and it's getting frustrating.

I'm creating a CSS layout. What I have is: the main menu on the left and the content on the right. Both are divs. The main menu contains several nested divs. For now I have deleted all the extra stuff in the main menu div, and left just the div with links and the div with the link to the top of the page. Everything looks fine, but the div that I want on the bottom doesn't show up.

Here's what I have (I'm not including everything, just the relevant parts):

<HTML>
<HEAD>
<TITLE>My title here</TITLE>
<style type="text/css">
<!--
#menu {
position:absolute;
top:0;
left:0;
}
#content {
margin:0px 0px 0px 240px;
padding:5px;
}
-->
</style>
</HEAD>
<BODY>
<A NAME="top"></A>

<div id="content" style="width:100%; height:90%; padding:5px;>
<TABLE WIDTH="100%">
My content here. </TABLE>
</div>

<div id="menu">

<div id="links" style="position:absolute; top:15; left:20; width:210; height:250; padding:5px;">
<CENTER>
<FONT FACE="Verdana,Arial,Helvetica" SIZE=2>
<B>My title here, again</B>
</FONT>
</CENTER>
<P>
<FONT FACE="Verdana,Arial,Helvetica" SIZE="2">
My links here</FONT>
<P>
</div>

<div id="gotop" style="position:absolute; bottom:5; left:20; width:210; padding:5px;">
<FONT FACE="Verdana,Arial,Helvetica" SIZE="2">
<A HREF="#top">&gt; Top of the page</A><BR>
</FONT>
</div>

</div>
</BODY>
</HTML>