PDA

View Full Version : HTML help wanted



Chris Wilson
26-08-2002, 10:50 AM
i want to stick a wee thing at the bottom of my page, just a wee "This site hosted on suse 8.0" and a picture of Tux, the Linux penguin. However with differant screen sizes etc i dont want to just put in the right amount of
s and hope. I need to find a way that tells the text
<Stay text.. go on the bottom> text + images </Stay> (good text)
i suspect i would have better luck trying that command with my dog.
Is there a way of doing this using simple html?

NathanTheKind
26-08-2002, 11:50 AM
Using Tables this can be done.

you only need to have one table, just make sure that it is set to take up one hundred percent of the width and make sure it goes to the bottom of the page, I think there is a way to do this, will check later and get back to you if no one else answers.

anyway insert the text and images into the cell. make sure that the vertical alignment of the cell tells all the text to go to the bottom.

if no one else answers I will give you the correct coding for this when I go home later today

cheers

:)

sal 
26-08-2002, 12:36 PM
goody, my forte

<body>
<table width="100%" height="100%">
<tr>
<td width="100%" valign="bottom" align="center">what ever you want here</td>
</tr>
</table>
</body>

(there is actually a much tidier way to do it, but it escapes me at the moment :?)

grtz sal.
tga

sal 
26-08-2002, 12:48 PM
oops, i just realised if this is going to be a page, it would need content, so the code i gave needs a little tweaking...

<body>
<table width="100%" height="100%">
<tr>
<td height="90%" valign="top">insert content here</td>
</tr>
<tr>
<td height="10%" align="center">insert tux here(and he will be centered, or change the align="center" to what ever)</td>
</tr>
</table>
</body>

Graham Petrie
26-08-2002, 05:17 PM
You could use a CSS style tag to create a <div> which is absolutely positioned at the bottom of the page. the you could just place your info inside the <div>

e.g. place this code at the top of the page in the <head> </head> section.

<style type="text/css">
div.bottom
{
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: auto;
height: auto;
width: 100%;
}
</style>

Then, at the end of your document before the </body> tag place your text and picture between <div class="bottom" align="center> </div> tags.

eg.

<div class="bottom" align="center">Text goes here
TUX GOES HERE</div>

G P

sal 
26-08-2002, 05:19 PM
css is the shiznit! how broad is it browser wise?

grtz sal.
tga

Graham Petrie
26-08-2002, 05:34 PM
Sal, it's supported by most browsers, although the really cool stuf (like fixed positioning to emulate frames) is only supportes by some browsers. Basically, there are only a small no. of things that you can do in css that the browsers don't support.

Click the link below for a set of tables which lists browser compatibility for all css functions (note that some functions are not supported by any browsers yet as CSS is more advnced than the current stable of browsers).

CSS browser support table (http://www.westciv.com/style_master/academy/browser_support/basic_concepts.html)

NOTE: it has several pages, and you have to click the right arrow on the bottom of the page to get to the rest of it.

G P

antmannz
26-08-2002, 06:14 PM
Yep, I'd recommend CSS.

The problem with the 'table' solution is that if the page is long, the user won't see anything until the entire page is downloaded, as browsers don't render a table until the </table> tag is hit. There is a way around this for IE, but CSS is better. :)

sal 
27-08-2002, 12:03 AM
oh, dont worry, i know my 'stuff', just a few things are a bit cloudy :D

grtz sal.
tga

Chris Wilson
27-08-2002, 03:06 AM
antmanns,
The page is very short, so i chose the table solution...

Thanx Sal,
The result is on something.net.nz (http://www.something.net.nz)

........much appreciated, now i feel a bindge of design coming on... i might actually see if i can get some of the stuff on something looking ½ good enough for Tux to front! Dont hold yer breath.. design is NOT my forte.

Chris Wilson
27-08-2002, 03:23 AM
On second look there was just one bug... (apart from the central image)

the 90% hieght value for the top ½ of the table had to be replaced with a "*" as i had scroll bars on a 14" screen for no good reason..
This causes no problems in opera, could it cause any in anything else?

sal 
27-08-2002, 09:24 AM
hmmm, no, im not too sure why the scroll bars are coming up, but, if you want the splash page (the one with tux on it) to look a lot cleaner, you can put this in the body tag

<body {blah blah} scroll=no>

but again, i have no idea about its use between browsers

grtz sal.
tga

*wow man, your site looks extremely better, very nice