Kristian
06-19-2004, 06:43 AM
I have a layout with 4 sections, top, left, right and center. I want the left, right and top to stay put (so i don't have to edit them every time). I have tried the code that all pages seem to use, but i can't get it to work. I used the last layout on this page http://lissaexplains.com/css3.shtml.
Anyway, I was wondering if i could use the external css file with the 3 different sections? What code i needed to use (if it's different from the standard code)? When you start the seperate file, does it need a .html or a .css at the end? and if there is anything special i need to do to use the external linking?
If you would like to see the page i'm working on its www.angelfire.com/tx5/acaraaid
for external css pages...
http://lissaexplains.com/css2.shtml#external
basically, you put all the css you desire onto a new document (leave out the STYLE tag set) and save the file as "whatever.css". you then link your html page to it as it says on the linked page above.
Kristian
06-20-2004, 11:56 PM
Ah! thanks, i forgot to leave out the style thing! Of corse it was something little and stupid :)
very common error.
no worries.
Kristian
06-21-2004, 10:35 PM
Hmmm i took it out and it's still not working. Would there be a problem since i want to put something that is in the head of my file and something that is in the body of my file into the same .css file?
the example link you provide in your first post, it is not using an external style page yet. please provide a link to your page having the problems with the external css page.
thanks.
Kristian
06-24-2004, 05:23 AM
Now that one will work, i took it down because i couldn't figure out what was wrong, just ignore the link that is on there now. css.css is my css file. Thanks for all your help! :)
the only thing that should be on your css page is css coding only...
body
{ margin-top: 0;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
padding-left: 0;
padding-right: 0;
}
#header {
margin: 20px;
padding: 10px;
height: 100px;
}
#left {
position: absolute;
left: 73px;
top: 295px;
width: 200px;
}
#center {
top: 0;
margin-left: 230px;
margin-right: 230px;
}
#right {
position: absolute;
right: 29px;
top: 295px;
width: 200px;
}
delete everything else off of your css page.
all of the html coding must be on a normal html page.
Kristian
06-25-2004, 07:43 PM
But then it doesn't make it so i can edit one page and change all of the links at once.
kittycat
06-25-2004, 07:48 PM
You don't use CSS for that, it's purely for changing the look of the page.
SSI or PHP includes are more what you're looking for: http://www.lissaexplains.com/html6.shtml (if your server supports them)
Or a javascript include: http://javascript.about.com/library/weekly/aa102901a.htm
css will change the link "style".
for changing actual links and other html stuff, using an "include" code through SSI or PHP as suggested is your answer.
Kristian
06-26-2004, 07:24 AM
yes! thanks to both of you thats exactly what i needed!