|
|
|
|
![]() ![]() |
Apr 18 2006, 07:27 PM
Post
#1
|
|
|
Newbie ![]() Group: Members Posts: 9 Joined: 10-April 06 Member No.: 21,629 |
I am attempting to create style sheets in order to make editing easier. I have created one style sheet that has the basics for my horizontal menu. However I would like to create another that will have the links for the menu. My first menu works because it is all css formatted. However, the portion I want to use that has the "link details" is in .html. Can this be put into a style sheet, and if so how do I create that?
The website can be viewed at http://www.faithcity.org/test2.html |
|
|
|
Apr 18 2006, 08:17 PM
Post
#2
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 4,071 Joined: 24-July 05 From: Linix, DOS and Windows…the good, the bad and the ugly Member No.: 9,787 ![]() |
No, you can't have html in a css stylesheet.
The stylesheet acts upon an html file only. Define the html on a page and then point to the css file using a link tag. You can have several css files act upon a single html page, though. Typically, one for screen output and one for printing are the most common. |
|
|
|
Apr 19 2006, 12:13 AM
Post
#3
|
|
|
Advanced Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 106 Joined: 1-April 06 Member No.: 21,148 |
It sounds like what you'd really like to use is an include function, like the one found in PHP. Thankfully, trap17 fully supports php, and the function's very easy to use, so if you look up a few examples you should have it done in no time.
|
|
|
|
Apr 19 2006, 02:02 PM
Post
#4
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 936 Joined: 14-April 05 From: West Chester, PA Member No.: 5,636 |
Yeah you cant have html in a style sheet. Basically your site most likely only will need one style sheet for the whole site. In it you should define classes and ids for different types of styles in your site. So for your links you could have a class called horizontalBar and then have id's for a.hover, etc. Then for your links just make a new class (or dont even use a class) and make the ids to format it the way you want. You do not use style sheets to show data, just to format it so that if you ever decide to change the look and feel of your website, all you have to do is change the style sheet becuase as long as you dont want to change the layout, all the colors and other details are able to be changed from there.
|
|
|
|
Apr 20 2006, 07:47 PM
Post
#5
|
|
|
Newbie ![]() Group: Members Posts: 9 Joined: 10-April 06 Member No.: 21,629 |
I have attempted to add the "include function" to the site, but I am getting a php error. For some reason it will not point to the item correctly, and it throws the entire rest of the page out of wack!
I am now using the test page of http://www.faithcity.org/test2.html. Any idea what could make this not function properly? Actually, after some research it appears that my editor will not allow php. Is there a .html function that will do the same thing? This post has been edited by ctbrons: Apr 20 2006, 08:55 PM |
|
|
|
Apr 23 2006, 10:07 PM
Post
#6
|
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,161 Joined: 9-May 05 From: Brisbane, QLD Member No.: 6,818 |
What do you mean your editor won't allow PHP? Which editor are you using?
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 11th October 2008 - 08:05 AM |