HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
CSS with HTML links
Post new topic   Reply to topic    HTML Help Forum Index -> SSI
View previous topic :: View next topic  
Author Message
RichieW13



Joined: 23 Aug 2005
Posts: 51

PostPosted: Tue Aug 23, 2005 3:26 pm     CSS with HTML links Reply with quote

Is there any way to create a css that does HTML links?

For example, at the bottom of each of my pages, I want to have a link to every other page on my site. Is there a way that instead of putting a hard link on every page, I can put a reference to the css so that if a link changes, I only have to change it one time?

Does this make sense?
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8257
Location: Castle Rock CO USA

PostPosted: Wed Aug 24, 2005 4:05 am     Reply with quote



If you have given your div a name like footer:
Code:
div.footer a:link, div.footer a:visited
{
     color: #330099;
     font-size: 0.8em;
}
div.footer a:hover, div.footer a:active
{
     color: #990000;
     text-decoration: none;
}

This will apply the classes to the links inside a div named footer.

For a little more information check out Pseudo-Classes
MissingDividends



Joined: 16 Aug 2005
Posts: 25

PostPosted: Thu Aug 25, 2005 7:23 am     Reply with quote

I think what you want is a dynamic webpage. If I understand what you are saying, you want the same footer on the bottom of evey page, but you want to be able to edit it just once to change it.

The easiest way to do that would be to change your pages to php (it isn't as hard as it might sound, just change the extensions), and add:
Code:

<?php
include ('footer.html');
?>

to the bottom of your page.

Create a file called footer.html that has the links in it, and you should be good to go.


There are other ways to do it (like shtml) but I never bothered to learn enogh to explain it to someone.
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8257
Location: Castle Rock CO USA

PostPosted: Thu Aug 25, 2005 7:30 am     Reply with quote

You're right - I misread it - I thought he was looking for a CSS solution to something since it was in the CSS topic area.

You can use an include file, like PHP if your server supports it. SHTML is the same basically as well as ASP. Of course, you would have to rename your pages (like index.html to something like index.shtml, index.phtm, index.php, index.asp, etc) to be parsed correctly.

For ASP, it would be something like:
Code:
<!--#include file="includes/header.asp" -->

SSI:
Code:
<!--#include file="includes/header.txt" -->

Of course, it also depends on the name of the file etc. You can have Apache parse all HTML as SHTML or PHP, but this places a lot more load on the server and can slow your site down as well.
RichieW13



Joined: 23 Aug 2005
Posts: 51

PostPosted: Thu Aug 25, 2005 8:13 am     Reply with quote

MissingDividends wrote:
I think what you want is a dynamic webpage. If I understand what you are saying, you want the same footer on the bottom of evey page, but you want to be able to edit it just once to change it.


Yes, this is what I was looking for.

Quote:

Create a file called footer.html that has the links in it, and you should be good to go.


So I guess it turns out I'm in the wrong forum for this topic now, but how would I list the links in the footer.html file? Do I format them in the file? I want the links to all be on the bottom row of the footer. Or does it get formatted on the php page?
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8257
Location: Castle Rock CO USA

PostPosted: Thu Aug 25, 2005 8:18 am     Reply with quote

You basically create something like:
Code:
<a href="/compare.asp">Compare Plans</a> : <a href="/canadian_rates.asp">Canadian Plans</a> : 
<a href="/international_rates.asp">International Rates</a> : <a href="/live/">Live Demos</a> :
<a href="/toll-free/features/fax_mail.asp">Fax Services</a> :
<a href="/toll-free/features/weblink/default.asp">WebLink</a> <br>
<a href="/distributors.asp">Become a Reseller</a> : <a href="/800_plans/solutions/">Business Solutions</a> : <a href="/contact/">
Contact Us</a> : <a href="/support/">Support Documents</a>

And then you can use your div / table to format it. You do not need the <head> / <body> since that will be pulled from your other file
RichieW13



Joined: 23 Aug 2005
Posts: 51

PostPosted: Thu Aug 25, 2005 8:22 am     Reply with quote

I'll give it a shot, thanks!
RichieW13



Joined: 23 Aug 2005
Posts: 51

PostPosted: Thu Aug 25, 2005 9:36 am     Reply with quote

I did it. That was easy. Thanks a bunch guys.

www.vrafan.com
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8257
Location: Castle Rock CO USA

PostPosted: Thu Aug 25, 2005 9:57 am     Reply with quote

Good luck with the site!
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> SSI All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial