Welcome Guest, Not a member yet? Register   Sign In
How to add folders like CDD, images etc. ?
#2

(08-30-2016, 02:07 PM)planteg Wrote: Hi all,

my web site is located on a Raspberry Pi zero running raspbian. The web server is appache 2, I installed CodeIgniter under just below var, so above www.

I tried inserting a reference to a style sheet, a .CSS file, but that does not work. Looking at the generated HTML code, it looks like it needs to have the CSS files below http://mydomain.com  Huh.

Does that mean the style sheet needs to be available from within the browser who runs the web site either:

  • from the web site itself
  • or inside the page itself ?
Is there some way I can have the styles outside the header file (view) and reference it from the header ?

Thanks

You can put your css code inside your view (which is very ugly). Put the code anywhere in your page just before the elements affected by that css code. Like this:

Code:
<style media='screen' type='text/css'>
.jumbotron {
background: url('images/image.jpg');
color: #fff;
margin-top: 100px;
padding-top: 200px;
min-height: 400px; }
</style>

You can't have any css file outside of webroot, so you can reference the css file in the <head> section of your view (which is more clever), for example like this:

Code:
<link rel="stylesheet" href="http://mydomain.com/assets/bootstrap/css/bootstrap-theme.css" media="all">
This means you have a css file called bootstrap-theme.css inside assets->bootstrap->css folders in your webroot.

Hope this helps. Regards.
Reply


Messages In This Thread
RE: How to add folders like CDD, images etc. ? - by portaflex - 08-30-2016, 04:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB