View Single Post
Old 08-05-2008, 05:29 PM   #2 (permalink)
CrazeD
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,686

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: CSS for Bringing Up Images Last

For static images, such as those used with template files, use CSS. For dynamic images, such as those that change from page to page, use HTML.

If you really want to create a CSS file for each page, which is rather stupid, you can do it pretty easily with PHP. Just make a folder called CSS. Then for each page, make a CSS file. Like, home.css, contact.css...etc. Then dynamically call the CSS file with PHP depending on the page. For simplicities sake, I'll just show you a snippet of code that uses GET for the page.

PHP Code:
<?php

$page 
$_GET['page'];

echo 
'<link rel="stylesheet" type="text/css" href="css/'.$page.'.css" />';

?>

__________________

Need website help? PM me!
CrazeD is offline