OZONE Asylum
Forums
Site reviews!
New site layout
This page's ID:
10441
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
First the class vs id thing: A class (ie .className in the CSS file) is used to specify a styling that is used by a lot of elemts of the page. You could for example which to have different words in a text color red. This would be accomplished by first creating a class: .redText { color: #f00; } Then in the paragraph you would color the selected words like this: ...this is a <span class="red">red</span> word. This is another <span class="red">red</span> word... When your are using the id (ie #idName in the CSS file) you are specifying styles for an element that only occures once on the entire page. Examples of this are navigation bar, header etc. An example of this might be: #menu { float: left; width: 100px; } and in the html file: <div id="menu"> ... </div> Hope that helps :) The link thing that DL mentions is regarding having the link leading to the current page look different and preferable not be a link. The reasons this is good are mentioned in my previous post. The method Quisja mentioned solves the first 'problem'. It gives the link a different style, but the link still remains a link. DL's solution (which is the one I use on my page as well) is better, since it solves both problems. One way to implement DL's solution first create two classes, one for the 'normal link' and one for the 'abnormal link'. For example: .normal {color: #0f0; } .abnormal { color: #00f; } Then to create the menu you could first create an array holding each menu-element, and create a variable showing which page the user is currently on. The code could then look something like this: [code] <?php $pages = array('link1.php', 'link2.php'); $currentPage = 1; /* create menu */ for ($i=0; $i<sizeof($pages); $i++) { if ($i == $currentPage) { echo "<span class=\"abnormal\">link</span>"; } else { echo "<a href=\"".$pages[$i]."\" class=\"normal\">link</a>"; } } ?> [/code] That code would create a link for each link in the $pages array, but when it comes to the link leading to the current page it creates a normal text (instead of a link) with the class 'abnormal'. If you're unfamiliar with php it might be better to use Quisja's method in the beginning since it solely relies on CSS to format the links.... _________________________ "There are 10 kinds of people; those who know binary, those who don't and those who start counting at zero" - [url=http://www.golden-ratio.net]the Golden Ratio[/url] - [This message has been edited by Veneficuz (edited 09-18-2003).]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »