Cant get my CSS style to work :(
Permalink
Hi there!
I'm new here and I am trying to create my first theme.
I found a bunch of tutorials on creating a theme and they are all basically the same, I have done everything as they say but for some reason when I install my theme and activate it, all I can see is the unordered lists from my 2 navigation bars. It looks like an ordinary HTML page without any CSS and I cant figure out why :(
Here is my header.php code:
..and my default.php:
Both my header.php and footer.php files are in a folder called "elements" in the theme folder, other than that my theme folder contains my main.css file, default.php file and images folder.
Would be awesome if someone could take a look at my code and tell me if I made a mistake, I have been trying for a couple of days and I just cant figure it out :(
Thanks in advance :)
I'm new here and I am trying to create my first theme.
I found a bunch of tutorials on creating a theme and they are all basically the same, I have done everything as they say but for some reason when I install my theme and activate it, all I can see is the unordered lists from my 2 navigation bars. It looks like an ordinary HTML page without any CSS and I cant figure out why :(
Here is my header.php code:
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd"> <html lang="en"> <head> <style type="text/css" media="screen">@import "<?php echo $this->getStyleSheet('main.css')?>";</style> <?php Loader::element('header_required'); ?> </head> <body>
..and my default.php:
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); $this->inc('elements/header.php'); ?> <div id="container"> <div class="first_menu_bg"> <ul id="first_menu"> <li><a href="#" class="home">Home</a></li> <li><a href="#" class="onama">O nama</a></li> <li><a href="#" class="last_min">Last Minute</a></li> <li><a href="#" class="kontakt">Kontakt</a></li> </ul> </div> <div id="logo_bg"> <div id="logo_box"> <div id="logo"><a href="#"><img src="<?=$this->getThemePath()?>/images/goya_logo.png" alt="logo" width="354" height="187" vspace="20" border="0" /></a>
Viewing 15 lines of 43 lines. View entire code block.
Both my header.php and footer.php files are in a folder called "elements" in the theme folder, other than that my theme folder contains my main.css file, default.php file and images folder.
Would be awesome if someone could take a look at my code and tell me if I made a mistake, I have been trying for a couple of days and I just cant figure it out :(
Thanks in advance :)
By the way, why don't you try
instead of @import?