Hey guys, I was wondering. I have a nice Christmas CSS and have my table links with the colous and links nicely set up, but I want to implement the HTML table and links within the CSS file, that way I don't have to keep copy/paste the table inside a brand new HTML document when I create a new page, instead it'll automatically be loaded within the css file. Can it be done? Here's the table as it is in the CSS file and then the HTML document:
Can I put the HTML code into the CSS file and have the table auto load?
Thanks
Daniel Team Member
Joined: 06 Jan 2002
Posts: 2564
Posted:
Sun Nov 09, 2003 7:50 am (21 years ago)
CSS files are for layout so you can't put anything but CSS in them. However you can put your code in:
a Javascript file - you'll have to use the appropriate JS commands to output the HTML though
a normal HTML file which could be loaded via an iframe
a PHP file and include it into your main file - you'd need to have your home page parsed by PHP though (by either fiddling with the config or changing the file extension to .php).
a file included via SSI (Server Side Includes) - similar to PHP solution
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.