Welcome Guest, Not a member yet? Register   Sign In
CSS and File Structure
#7

[eluser]jedd[/eluser]
Here's the code from my view:

Code:
echo  link_tag('assets/stylesheets/'. $theme .'.css');

Which lets me swap CSS based on user's theme .. but the point is link_tag() is a handy function to use here.

The above code comes out, at the browser, as :

Code:
<link  href="http://localhost/devel/pdb3/assets/stylesheets/green.css" rel="stylesheet" type="text/css" />

link_tag() uses the same logic as base_url() to calculate the real location of the file, so it's pretty painless.


Messages In This Thread
CSS and File Structure - by El Forum - 03-24-2009, 02:58 PM
CSS and File Structure - by El Forum - 03-24-2009, 03:37 PM
CSS and File Structure - by El Forum - 03-24-2009, 03:41 PM
CSS and File Structure - by El Forum - 03-24-2009, 03:56 PM
CSS and File Structure - by El Forum - 03-24-2009, 03:59 PM
CSS and File Structure - by El Forum - 03-24-2009, 04:22 PM
CSS and File Structure - by El Forum - 03-24-2009, 04:34 PM
CSS and File Structure - by El Forum - 03-24-2009, 05:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB