Connecting Tech Pros Worldwide Forums | Help | Site Map

How to insert footer w/ CSS

SwimDude0614's Avatar
Newbie
 
Join Date: Nov 2008
Location: O'Fallon, MO (St. Louis)
Posts: 12
#1: Nov 1 '08
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
Markus's Avatar
Moderator
 
Join Date: Jun 2007
Location: York, England, with wolves.
Posts: 4,936
#2: Nov 1 '08

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.
SwimDude0614's Avatar
Newbie
 
Join Date: Nov 2008
Location: O'Fallon, MO (St. Louis)
Posts: 12
#3: Nov 1 '08

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.
drhowarddrfine's Avatar
Expert
 
Join Date: Sep 2006
Posts: 5,563
#4: Nov 1 '08

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">
SwimDude0614's Avatar
Newbie
 
Join Date: Nov 2008
Location: O'Fallon, MO (St. Louis)
Posts: 12
#5: Nov 1 '08

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?
SwimDude0614's Avatar
Newbie
 
Join Date: Nov 2008
Location: O'Fallon, MO (St. Louis)
Posts: 12
#6: Nov 1 '08

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?
drhowarddrfine's Avatar
Expert
 
Join Date: Sep 2006
Posts: 5,563
#7: Nov 1 '08

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.)
SwimDude0614's Avatar
Newbie
 
Join Date: Nov 2008
Location: O'Fallon, MO (St. Louis)
Posts: 12
#8: Nov 1 '08

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
drhowarddrfine's Avatar
Expert
 
Join Date: Sep 2006
Posts: 5,563
#9: Nov 1 '08

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.
SwimDude0614's Avatar
Newbie
 
Join Date: Nov 2008
Location: O'Fallon, MO (St. Louis)
Posts: 12
#10: Nov 1 '08

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?
drhowarddrfine's Avatar
Expert
 
Join Date: Sep 2006
Posts: 5,563
#11: Nov 2 '08

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.
SwimDude0614's Avatar
Newbie
 
Join Date: Nov 2008
Location: O'Fallon, MO (St. Louis)
Posts: 12
#12: Nov 2 '08

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.
drhowarddrfine's Avatar
Expert
 
Join Date: Sep 2006
Posts: 5,563
#13: Nov 2 '08

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
#14: Nov 2 '08

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)
codegecko's Avatar
Moderator
 
Join Date: May 2007
Location: United Kingdom
Posts: 395
#15: Nov 2 '08

re: How to insert footer w/ CSS


Do you mean server-side includes, like this?

Expand|Select|Wrap|Line Numbers
  1. <!--#include file="footer.htm" -->
  2.  
and then in footer.htm:
Expand|Select|Wrap|Line Numbers
  1. <div class="footer">My footer stuff goes here</div>
  2.  
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
SwimDude0614's Avatar
Newbie
 
Join Date: Nov 2008
Location: O'Fallon, MO (St. Louis)
Posts: 12
#16: Nov 2 '08

re: How to insert footer w/ CSS


Quote:

Originally Posted by codegecko

Do you mean server-side includes, like this?

Expand|Select|Wrap|Line Numbers
  1. <!--#include file="footer.htm" -->
  2.  
and then in footer.htm:
Expand|Select|Wrap|Line Numbers
  1. <div class="footer">My footer stuff goes here</div>
  2.  
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.
Reply