Jump to content
xisto Community
Sign in to follow this  
ctbrons

Creating Style Sheets

Recommended Posts

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

It sounds like what you'd really like to use is an include function, like the one found in PHP. Thankfully, Xisto 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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Edited by ctbrons (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.