Welcome Guest, Not a member yet? Register   Sign In
Background Image in CSS problem.
#7

[eluser]NeoArc[/eluser]
But remember not to use absolute paths ( beggining with: /) if your CI instalation is in a subdirectory.
Relative paths to the CSS file are good:


assets/css/hello.css
assets/img/pattern.jpg

Code:
/* hello.css */

body{ background-image: url(../img/pattern.jpg); }



And.. perhaps you should link to your css file (and other internal files) like this (requires URL helper):


Code:
<head>
<title>-</title>
<base href="<?php echo base_url()?>" />
<link rel="stylesheet" href="assets/css/hello.css" />
</head>
<body>
<div>
  <img src="assets/img/sun.png" alt="Tha Sun" title="" />
</div>
&lt;/body&gt;


Messages In This Thread
Background Image in CSS problem. - by El Forum - 07-22-2011, 08:29 PM
Background Image in CSS problem. - by El Forum - 07-22-2011, 09:13 PM
Background Image in CSS problem. - by El Forum - 07-22-2011, 11:11 PM
Background Image in CSS problem. - by El Forum - 07-23-2011, 12:57 AM
Background Image in CSS problem. - by El Forum - 07-24-2011, 02:43 AM
Background Image in CSS problem. - by El Forum - 07-24-2011, 06:09 AM
Background Image in CSS problem. - by El Forum - 07-24-2011, 09:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB