4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Tables within CSS files
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
genkidave
Junior WebHelper
Junior WebHelper


Joined: 05 Nov 2003
Posts: 7

PostPosted: Sun Nov 09, 2003 5:31 am (21 years ago) Reply with QuoteBack to Top

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:

HTML:

<table>
<tr class="links">
<td></td><td></td><td></td><td></td>
<td class="links"><A href="http://japandrews.tripod.com/index.htm">Home</A></td>
<td></td><td></td><td></td><td></td><td></td><td></td>
<td class="links"><A href="http://japandrews.tripod.com/photos.html">Photos</A></td>
<td></td><td></td><td></td><td></td><td></td><td></td>
<td class="links"><A href="http://japandrews.tripod.com/comments.html">Comments</A></td>
<td></td><td></td><td></td><td></td>
</tr>
</table>

CSS File:

TABLE {background: #004000; border-width: medium; border-style: double; border-color: #FF0000; align: center;}
TR.links {font-size:18pt;}
TD.links {font-size:18pt;}

A:link {text-decoration: none; color: #FFFFFF;}
A:visited {text-decoration: none; color: #FFFFFF;}
A:hover {text-decoration: none; color:#FF0000;}


Can I put the HTML code into the CSS file and have the table auto load?

Thanks
OfflineView User's ProfileFind all posts by genkidaveSend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Sun Nov 09, 2003 7:50 am (21 years ago) Reply with QuoteBack to Top

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

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




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.


Page generation time: 0.134123 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme