a:link, active, hover, visited....

This is a discussion on "a:link, active, hover, visited...." within the Web Page Design section. This forum, and the thread "a:link, active, hover, visited.... are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #21  
Old Nov 3rd, 2007, 17:41
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: a:link, active, hover, visited....

The css you posted above should work. Just apply the .selected class to the current page link.
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #22  
Old Nov 4th, 2007, 00:12
mcdanielnc89's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Missouri
Age: 19
Posts: 232
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: a:link, active, hover, visited....

Marc, I've dont thaT BUT have been getting this error...

Quote:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/nbjf/public_html/aboutus.php on line
Here's the html for the page.

HTML: Select all
<?php
// tell the php what page it is!
$page = "aboutus";
?>
<div style="text-align:left">
  <div id="centeredimage">
    <img class="image1" src="images/aboutus.png" alt="About us">
  </div>
 <p class="style2">
    New Breed Jesus Freaks is a G-Rated Community for sharing
    the word of the Lord and bringing people of all ages
    closer to God! We are very friendly and compassionate and
    if there are members that get out of hand we shall deal
    with them. We Pray you will consider joining our ministry
    here at NBJF and support us. Take your shoes off at the
    door, relax and have a great time with us. This group is
    for all ages. The group name doesn't mean we're bunch of
    freaks from the street or anything. It simply means that
    we are Christians who are on fire for God and love him
    with all of our hearts.
  </p><br>
  <p class="style2">
    We have a lot of forum topics to keep you busy! Feel free
    to read the messages and post some of your own if you'd
    like. We have a great time here, so come fellowship with
    us. The chat room is open 24/7 as well as scheduled chats
    every night at 7:15 p.m. central standard time.(CST) We
    would love to have you here at our site. So come join in
    on the fun. Make sure you have a valid email address too.
  </p><br>
  <h1 style="text-align: center">
    All are Welcome!
  </h1><br>
  <p class="style2">
   Please be sure to read our rules before you join. If you
   have already joined; go ahead and read them.
  </p><br>
  <p class="style2">
    If you have anymore questions, concerns or anything,
    please use the contact page and let us know. We will be
    gladly to assist in answering any questions you have.
  </p>
</div>
Last Blog Entry: My blog? (Oct 18th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #23  
Old Nov 4th, 2007, 00:28
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: a:link, active, hover, visited....

Did you define $page = "name"; for each page? "aboutus" only applies to one of them, your About Us page.
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #24  
Old Nov 4th, 2007, 00:33
mcdanielnc89's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Missouri
Age: 19
Posts: 232
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: a:link, active, hover, visited....

no for I was testing out to see if it worked on one of the pages first and it don't.
Last Blog Entry: My blog? (Oct 18th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #25  
Old Nov 4th, 2007, 00:52
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: a:link, active, hover, visited....

Ah, ok. To tell you the truth, I think you'd be better off making actual pages instead of generating content with php. So instead of what you have now, use this:
HTML: Select all
      <ul id="menu">
   <div class="selected"><li><a href="index.php" class="current">Home</a></li></div>
   <div class="notselected"><li><a href="aboutus.php" class="current">About Us</a></li></div>
   <div class="notselected"><li><a href="signin.php">Monthly Sign-in</a></li></div>
   <div class="notselected"><li><a href="statementoffaith.php">Statement of Faith</a></li></div>
   <div class="notselected"><li><a href="http://www.forums.newbreedjesusfreaks.com">Forums</a></li></div>
   <div class="notselected"><li><a href="rules.php">Rules</a></li></div>
   <div class="notselected"><li><a href="http://www.chat.newbreedjesusfreaks.com">Chatroom</a></li></div>
   <div class="notselected"><li><a href="downloads.php">Downloads</a></li></div>
   <div class="notselected"><li><a href="requests.php">Requests</a></li></div>
   <div class="notselected"><li><a href="tencommandments.php">Ten Commandments</a></li></div>
   <div class="notselected"><li><a href="#">Pictures</a></li></div>
   <div class="notselected"><li><a href="staff.php">Staff</a></li></div>
   <div class="notselected"><li><a href="memberofthemonth.php">Member of the Month</a></li></div>
   <div class="notselected"><li><a href="puritypledge.php">Purity Pledge</a></li></div>
   <div class="notselected"><li><a href="links.php">Links</a></li></div>
   <div class="notselected"><li><a href="search.php">Search</a></li></div>
   <div class="notselected"><li><a href="donate.php">Support Us</a></li></div>
   <div class="notselected"><li><a href="contactus.php">Contact Us</a></li></div>
      </ul>
Of course you then need to actually make those pages. Then, using the css .selected class will be a lot easier.

Cheers,
SWagner
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #26  
Old Nov 4th, 2007, 00:58
mcdanielnc89's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Missouri
Age: 19
Posts: 232
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: a:link, active, hover, visited....

That's the problem. i don't want to do that. I got tired of updating piece by piece....
Last Blog Entry: My blog? (Oct 18th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #27  
Old Nov 4th, 2007, 00:59
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: a:link, active, hover, visited....

So how do you update now? If this is not what you want, you could use frames for the main content. Then, the navigation and header stay the same.
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #28  
Old Nov 4th, 2007, 01:01
mcdanielnc89's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Missouri
Age: 19
Posts: 232
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: a:link, active, hover, visited....

When updating links all I have to do is open up the index.php file instead of having to update page by page.
Last Blog Entry: My blog? (Oct 18th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #29  
Old Nov 4th, 2007, 01:31
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: a:link, active, hover, visited....

I see. I still suggest frames... They give you pretty much the same freedom as the way you're doing it.
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #30  
Old Nov 5th, 2007, 03:01
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: a:link, active, hover, visited....

Frames?!?! I would not use that! It's old...
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #31  
Old Nov 5th, 2007, 03:12
mcdanielnc89's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Missouri
Age: 19
Posts: 232
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: a:link, active, hover, visited....

Tis why i left no comment, lol.... if ya get a chance monie and you know how to do it via php hit me up on messenger if you get free time. if not don't worry about it, lol.
Last Blog Entry: My blog? (Oct 18th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #32  
Old Nov 5th, 2007, 03:21
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: a:link, active, hover, visited....

yeah, Frames are old, as old as my 10 years old cat but still very healthy tho...
I am new in PHP as well mcdaniel...
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #33  
Old Nov 5th, 2007, 03:25
mcdanielnc89's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Missouri
Age: 19
Posts: 232
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: a:link, active, hover, visited....

ahh, lol.. Okay.
Last Blog Entry: My blog? (Oct 18th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #34  
Old Nov 8th, 2007, 00:13
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: a:link, active, hover, visited....

OK. I give up! I guess frames are a bad idea too. Anyone else have a suggestion?
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #35  
Old Nov 8th, 2007, 00:33
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: a:link, active, hover, visited....

Quote:
Originally Posted by swagner View Post
OK. I give up! I guess frames are a bad idea too. Anyone else have a suggestion?
If you want to get the same benefits as frames, with none of the drawbacks and with many other advantages, the answer is simple: use PHP. You can replace frames with includes, but there's also much more that you can do to make your coding more efficient.

Yes, this requires a little effort in learning the rudiments of a scripting language. But it really, really pays off. PHP can save you vast amounts of manual labour.

I've only just gotten into PHP; but consider this example that I've been working on just recently:

Many of my web pages have "next page" and "previous page" links. These are listed once near the top of the page, once near the bottom, and once in invisible <link> navigation.

Whenever I make a new page or change an existing one, I must manually edit this code (all three sets). But with some PHP, I can just declare two variables ($next and $prev), and all that nav code is generated automatically for me.

In fact, it gets much more complicated than this, because my page sequence is sometimes affected by user preferences for more or less detail. Here the manual work becomes really miserable; but PHP trims it down to an absolute minimum and saves me even more time.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #36  
Old Nov 8th, 2007, 22:10
Highly Reputable Member
Join Date: Jul 2006
Location: Devon, England
Posts: 565
Thanks: 0
Thanked 0 Times in 0 Posts
Re: a:link, active, hover, visited....

Working with Jan's article on using $_GET, here is your index page
PHP: Select all

<?php
// check the $_GET['page'] variable
$page = ((isset($_GET['page']) && $_GET['page'] != '') ? $_GET['page'] : 'home');
// prevent file browsing
$page=(preg_match('/(\.\.|\/)/i',$page)?'home':$page);
// replace illegal characters
$page preg_replace('/[^a-zA-Z0-9 \._-]/','',$page);
// check if the requested file exists
$page = (file_exists('./pages/'.$page.'.php') ? $page 'error');
// and include the page
include('./pages/'.$page.'.php');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/html" lang="en">
<head>
    <title>New Breed Jesus Freaks</title>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="description" content="">
    <meta name="keywords" content="">

    <link href="includes/style.css" rel="stylesheet" type="text/css">
    <link href="includes/layout.css" rel="stylesheet" type="text/css">
    <link href="includes/menu.css" rel="stylesheet"&nbs