moh51n Posted February 28, 2012 Share Posted February 28, 2012 hi larry, im currently working through your book and have a problem with linking the css. im using a localhost environmnt, XAMPP my webroot is E:\XAMPP\htdocs my directory for the coffee site is E:\XAMPP\htdocs\s2 my config.php is: define('BASE_URI', 'includes/'); define('BASE_URL', 'localhost/s2/'); define('MYSQL', BASE_URI . 'mysql.inc.php'); the stylesheet works fine when i link it using <p><link rel="stylesheet" type="text/css" href=" Link to comment Share on other sites More sharing options...
Jonathon Posted February 28, 2012 Share Posted February 28, 2012 I don't understand the problem ? Link to comment Share on other sites More sharing options...
moh51n Posted February 29, 2012 Author Share Posted February 29, 2012 thats strange half my post went missing.... the problem is the stylesheet only works if i link it to the header template using the href="E:\XAMPP/htdocs/s2/styles/style.css" it doesnt load if i link it as href="../style/style.css" the header is in a folder called includes Link to comment Share on other sites More sharing options...
Larry Posted February 29, 2012 Share Posted February 29, 2012 The problem is you've put the site files in a subfolder and the CSS file is linked using an absolute path. You'll also have trouble with some of the links this way. And your BASE_URI and BASE_URL values are wrong. Link to comment Share on other sites More sharing options...
Recommended Posts