Ezilon.com - Target Your Audience, be Seen in Your Region

css linking

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

They have: 6 posts

Joined: Nov 2005

I know how to link files with CSS. Like a css file on the server that specifies the font weight, face, size, etc. Is it possible to make a table in the original css file and link it to a webpage on the server, so I don't have to make hundreds of tables and I can just type in a variable box3row1="This text goes to screen" on the webpage that the viewer is viewing? Does this make sense?

He has: 582 posts

Joined: Jul 2005

Variables are done with PHP, ASP, or other languages like that, not CSS. Perhaps I've misunderstood you, but I think you'll need to get into PHP if you want to use variables. Wink

-Kurtis
~View (and vote for) my art at BrickFish!

Megan's picture
Administrator

She has: 10,304 posts

Joined: Jun 1999

Would an include work for this? I'm not sure if I'm understanding you right either - what that will do is go from the page you are on to the server to grab a bunch of HTML then dump it back into the page. You can do this through Server Side Includes or with PHP (the more modern method). I don't have the code handy but it's really simple to do.

JeevesBond's picture
Moderator

He has: 3,711 posts

Joined: Jun 2002

Unfortunately there's no way of doing this with CSS, not if you want exactly the same content to appear over and over (CSS is for formatting, and that's all it can do, although it does that one thing very well!).

The way to do this - as Megan and mscreashuns pointed out is to include another file, it's as simple as:

<?php
include 'vars.php';
?>

I got that from: http://uk.php.net/manual/en/function.include.php

Do you have the ability to use PHP? If you're not sure there's a very easy to test to see if you can use it Smiling

a Padded Cell our articles site!

demonhale's picture

He has: 3,301 posts

Joined: May 2005

or make a table like layout with the borders visible for the css, and when its arranged according to your liking, put it on your css file and ID them as needed, then it will be as easy as calling individual div ids to generate a table-like structure from your css...