Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP
Author Message
Donovan
Client



Joined: Oct 07, 2003
Posts: 735
Location: Ohio

PostPosted: Wed Mar 08, 2006 10:44 am Reply with quote

What is the benefits from one to the other? What is the prefered method? Do I "include" either in a php page?
 
View user's profile Send private message Visit poster's website ICQ Number
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Wed Mar 08, 2006 10:48 am Reply with quote

I think its a matter of how big it is.

If you have many many styles in your sheet, you should use an external CSS file. That way, it is downloaded and saved once. However, this means your users have to have their browser check this file every time. For loading short pieces of style code, it maybe better to integrate it into the HTML output.. as in a .php file. This way it will not have to go to an external file everytime.

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
Donovan







PostPosted: Wed Mar 08, 2006 1:08 pm Reply with quote

If I want a single place where I can change cell colors in a table or have borders= "0" or border = "1", it would be best to have a css file..no?

Since I don't have a way to manage fonts, colors, border or backgrounds yet I think I need an external css file.

How do I include one, and how does it override the theme style as far as <TD> or <TH> tags?

For instance

Code:
td.rowpic {

      background-color: #4A473F;
      background-image: url(images/cellpic2.gif);
}
 
evaders99







PostPosted: Wed Mar 08, 2006 3:02 pm Reply with quote

You'll need to add this into your header

Code:


<LINK REL="StyleSheet" HREF="style.css" TYPE="text/css">


Your theme may already have on though, good to check your theme files first
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Wed Mar 08, 2006 5:57 pm Reply with quote

If you are not planning on distributing, then you might as well add to your various theme style.css files. One caution, though, is that be sure to given them pretty descriptive names (they need to be unique) because you don't want another module, block or theme script re-defining it. I just prefix mine with something I feel would make them unique.

I have also added additional <LINK > statements for external CSS files in either includes/my_header.php or includes/javascript.php. You can take a look at my HTML Newsletter 1.3 distro in the "extras" folder to see how I have made it possible to use an external CSS file instead of using my style.php script. It might give you some ideas.

You can also see by viewing my site's source that I created a module CSS file for each theme that I support so that I can change the color schemes to better match my themes if I want to.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP

View next topic
View previous topic
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©