View Full Version : Layout in an External Style Sheet?


Joseph Witchard
02-10-2007, 02:41 AM
My site is made up of a CSS layout like it's described on LEIA. But I have a CSS layout on every page instead of linking it to an external style sheet. Is there a way to make the layout of your website and put it in an external style sheet? If so, how?

LeSabre
02-10-2007, 03:16 AM
Taken from a previous post (http://www.lissaexplains.com/forum/showpost.php?p=426115&postcount=2) from Arwen::


Put your CSS code into an empty file and save it as style.css then upload it to your server and include it on every page.

<link rel="stylesheet" type="text/css" href="style.css">

Make sure you put this code into the <head> section of your page.

Joseph Witchard
02-10-2007, 02:32 PM
Is HTML allowed to be in the style sheet? Because in order for me to do what I'm talking about, some HTML would have to go in there. Thanks:)

Arwen
02-10-2007, 05:11 PM
No. HTML and CSS are different languages. What exactly are you trying to put there?

LeSabre
02-10-2007, 05:47 PM
Here is a topic (http://www.lissaexplains.com/forum/showthread.php?p=426135#post426135) (actually the one that has the post I linked to ^up there) that explains almost the same thing that you are asking - I thought it might be helpful for you to read it instead of me posting what I already said somewhere else, lol :)

Joseph Witchard
02-10-2007, 07:25 PM
http://www.uhrebirth.com

I used the copy and paste layouts Lissa has on LEIA. My CSS layout has a left column, right column, and a center one. The left column is filled with my navigation buttons to get around the site, and the right column is my scrolling marquee news ticker. What I'm trying to figure out, Arwen, is if I can somehow put my left navgiation menu and right news ticker in an external style sheet so I don't have to write out all of that code for each page:) Oh, and if the banner at the top could go there too, that would help very much as well:)

Arwen
02-10-2007, 09:27 PM
You cannot do it using CSS. CSS is used to customize the look of your page. If you host supports PHP you could try using PHP include (http://www.lissaexplains.com/html6.shtml#php), SSI (http://www.lissaexplains.com/html6.shtml#SSI) works fine too.

Joseph Witchard
02-10-2007, 09:38 PM
Ah, all right. Thanks:)

P.S. I'm getting ready to snap my PSP 9 CD in two from all of this button trouble=p lol