CodeIgniter Forums
Css Issues - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Css Issues (/thread-18402.html)

Pages: 1 2 3 4


Css Issues - El Forum - 05-07-2009

[eluser]umefarooq[/eluser]
First search in google and also you can find some thing from this link

http://net.tutsplus.com/tutorials/html-css-techniques/prototype-a-magazine-style-home-page-template-with-the-blueprint-css-framework/


Css Issues - El Forum - 05-07-2009

[eluser]slowgary[/eluser]
I recommend turning things backwards. Instead of designing in Photoshop and trying to make CSS do what Photoshop did, try creating a layout purely in CSS, then add background elements made in Photoshop. It's just gonna take practice, but doing it this way will eventually get you thinking about how you'll slice it as you're designing it. As for cross browser issues, there are a lot of sites that will list all of the differences between IE and real browsers, try quirksmode.com.


Css Issues - El Forum - 05-07-2009

[eluser]learning_php[/eluser]
Hi,

I put the site live again and changed the links to the ones i had before but it's giving me not found errors?


Css Issues - El Forum - 05-07-2009

[eluser]slowgary[/eluser]
So... do the pages exist? You're linking to:
Code:
http://www.wesayido.co.uk/Info/index.html (or .php)
http://www.wesayido.co.uk/Gifts/index.html (or .php)

Unless those pages are there you're going to get 404 not found errors


Css Issues - El Forum - 05-07-2009

[eluser]learning_php[/eluser]
Hi,
yep they are there
In my homepage controller i have:
Code:
function Info()
    {
        $this->load->view('info_view');
    }


    function Gifts()
    {
        $this->load->view('gifts_view');
    }

and link to them like so
Code:
<li>&lt;?= anchor('/Info','Information');?&gt;</li>
    <li>&lt;?= anchor('/Gifts','Gifts');?&gt;</li>



Css Issues - El Forum - 05-07-2009

[eluser]slowgary[/eluser]
I know this is the CodeIgniter forums, but I don't really understand the benefit of CodeIgniter in this case. Is there something more to your site than the 4 static pages?

The reason your links aren't working is pathing issues, or maybe your .htaccess.

If you go to http://www.wesayido.co.uk/index.php/Gifts you'll get your gifts page, but minus the stylesheet.

Also, you should crop your countdown.swf. It's wider than it's parent column so it's breaking the layout.


Css Issues - El Forum - 05-07-2009

[eluser]learning_php[/eluser]
Hi,

There isseveral database driven parts to this sitencludeing members only image gallery so i used codeigniter as it allowed me easily to set that up?

I link to the stylesheet the same way as the home page so is there a reason it not showing.

and my .htaccess file is as follows
Code:
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$/index.php/$1 [QSA,NC,L]
</IfModule>

<IfModule !mod_rewrite.c>
  # If we don’t have mod_rewrite installed, all 404’s
  # can be sent to index.php, and everything works as normal.

  ErrorDocument 404 /index.php
</IfModule>



Css Issues - El Forum - 05-07-2009

[eluser]slowgary[/eluser]
The stylesheet is using a relative path (@import 'stylesheet.css'), which means the browser expects to find it in the same directory as the page. The homepage loads by default so when you go to http://www.wesayido.co.uk the page IS in the same as the stylesheet (root). When you go to the other pages, however, they exist in a directory (/index.php/), so the stylesheet is technically missing. Change this:
Code:
@import 'stylesheet.css';
to this:
Code:
@import '/stylesheet.css';

This is an absolute path, which tells the browser that no matter what directory we're in, the stylesheet is in the root directory.


Css Issues - El Forum - 05-07-2009

[eluser]Dam1an[/eluser]
The other common way to include stylesheets is
Code:
&lt;link rel='stylesheet' type='text/css' media='screen' href='&lt;?=base_url()?&gt;css/style.css' /&gt;



Css Issues - El Forum - 05-07-2009

[eluser]n0xie[/eluser]
I think the problem is that your stylesheet is linked relative not absolute: i.e. it works on the homepage because the stylesheet is under the root dir. Once you load Gifts it tries to look for the stylesheet in http://www.wesayido.co.uk/Gifts/stylesheet.css where it obviously doesn't exist.

To test this try adding this to all your views and test if the stylesheet works:
Code:
&lt;link rel="stylesheet" type="text/css" href="http://www.wesayido.co.uk/stylesheet.css" /&gt;
edit: both slowgary and Dam1an beat me to the punch