How to insert footer w/ CSS  | Newbie | | Join Date: Nov 2008 Location: O'Fallon, MO (St. Louis)
Posts: 12
| | |
I'm extremely new to CSS (learned it two nights ago) and my dad told me I could insert a footer or header or some sort of preformatted text using CSS.... then he went to bed.
My website is www.stlswedespeed.com
I'd like to pull the bottom navigation (includes the five links at the bottom: forums - calendar) out of that index page, store it somewhere else (if i understood him correctly it goes into my stylesheet?), and then reinsert it to the index, /links.html, and /about.html.
I tried looking through "CSS Cookbook" by Christopher Schmitt and couldn't find anything. I'd ask my dad again but he's not here until late tonight.
Thanks for any and all help.
David
|  | Moderator | | Join Date: Jun 2007 Location: York, England, with wolves.
Posts: 4,936
| | | re: How to insert footer w/ CSS
I don't know about CSS but you can definitely do it with javascript or a serverside language.
|  | Newbie | | Join Date: Nov 2008 Location: O'Fallon, MO (St. Louis)
Posts: 12
| | | re: How to insert footer w/ CSS
lol. The HTML and CSS that you see on that page is all I know about web design. My dad's job is building website (www.hens-teeth.net) and so when I started a Saab & Volvo club in town he started helping me build this site. All I know about Java is it lets me play really fun games online and lets my dad bring home the bacon.
|  | Expert | | Join Date: Sep 2006
Posts: 5,563
| | | re: How to insert footer w/ CSS
Two quick things:
1) Java is not the same as JavaScript and have no relation to each other.
2) New pages should always use a strict doctype. You have no need for the transitional one. Replace it with this one:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
|  | Newbie | | Join Date: Nov 2008 Location: O'Fallon, MO (St. Louis)
Posts: 12
| | | re: How to insert footer w/ CSS Quote:
Originally Posted by drhowarddrfine 2) New pages should always use a strict doctype. You have no need for the transitional one. Replace it with this one:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> huh???
sorry, I know very little about this stuff. I started this page with Nvu and then prettied her up Bluefish while learning CSS. I've no idea what that is you typed.
What is "doctype" and what transitional one are you talking about?
|  | Newbie | | Join Date: Nov 2008 Location: O'Fallon, MO (St. Louis)
Posts: 12
| | | re: How to insert footer w/ CSS
nvm. i see where at the top is says <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
what's that mean? I presume "DOCTYPE html" tells the browser it's an html document. what's the rest mean?
|  | Expert | | Join Date: Sep 2006
Posts: 5,563
| | | re: How to insert footer w/ CSS
Now pay attention or I'll come down from St. Charles and slap you.
The very first line of your html is the doctype. See the article about doctypes under the Howtos section at the top of this page.
Are you using Linux? (If so, good boy.)
|  | Newbie | | Join Date: Nov 2008 Location: O'Fallon, MO (St. Louis)
Posts: 12
| | | re: How to insert footer w/ CSS
you're IN st. charles??? do you know my dad? we're in st. charles too.
anyway, OF COURSE i'm using linux. i was just about to upgrade Ubuntu to 8.10 :D :D :D
well, i'll go read that article
|  | Expert | | Join Date: Sep 2006
Posts: 5,563
| | | re: How to insert footer w/ CSS
Ack! Weldon Spring actually. By 94 & O'fallon. No, I don't know your dad but I think I've heard of his company.
|  | Newbie | | Join Date: Nov 2008 Location: O'Fallon, MO (St. Louis)
Posts: 12
| | | re: How to insert footer w/ CSS
ok, well i read about doctypes and fixed that. for some reason only the index page was set to transitional.
so, back to the original question. how do i insert preformatted text?
|  | Expert | | Join Date: Sep 2006
Posts: 5,563
| | | re: How to insert footer w/ CSS Quote:
I'd like to pull the bottom navigation out of that index page, store it somewhere else and then reinsert it to the index, /links.html, and /about.html.
I don't understand that.
|  | Newbie | | Join Date: Nov 2008 Location: O'Fallon, MO (St. Louis)
Posts: 12
| | | re: How to insert footer w/ CSS
nvm. my dad finally got home and explained it to me. what i was asking wasn't possible but he did tell me the correct way to do it, so life is good.
|  | Expert | | Join Date: Sep 2006
Posts: 5,563
| | | re: How to insert footer w/ CSS Quote:
Originally Posted by SwimDude0614 ... so life is good. Well, now, wait a minute. Let me think about THAT and I'll get back to you.
| | Expert | | Join Date: Aug 2008
Posts: 397
| | | re: How to insert footer w/ CSS Quote:
Originally Posted by drhowarddrfine Well, now, wait a minute. Let me think about THAT and I'll get back to you. Life is pleasant. Death is peaceful. It's the transition that's troublesome.
-- Isaac Asimov (1920 - 1992)
|  | Moderator | | Join Date: May 2007 Location: United Kingdom
Posts: 395
| | | re: How to insert footer w/ CSS
Do you mean server-side includes, like this? -
<!--#include file="footer.htm" -->
-
and then in footer.htm: -
<div class="footer">My footer stuff goes here</div>
-
With SSIs you can drag content from an external HTML file into another HTML file, but you might need to rename the "parent" file to have a .shtm/.shtml extension.
Hope it helps.
codegecko
|  | Newbie | | Join Date: Nov 2008 Location: O'Fallon, MO (St. Louis)
Posts: 12
| | | re: How to insert footer w/ CSS Quote:
Originally Posted by codegecko Do you mean server-side includes, like this? -
<!--#include file="footer.htm" -->
-
and then in footer.htm: -
<div class="footer">My footer stuff goes here</div>
-
With SSIs you can drag content from an external HTML file into another HTML file, but you might need to rename the "parent" file to have a .shtm/.shtml extension.
Hope it helps.
codegecko Server Side Include is what I ended up doing. Now to learn the CSS for making the "Links" at the top of links.html appear yellow instead of grey like the rest.
|  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,392 network members.
|