![]() |
Ok Why wont any images show up for me ifrom my css - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Ok Why wont any images show up for me ifrom my css (/showthread.php?tid=32084) |
Ok Why wont any images show up for me ifrom my css - El Forum - 07-12-2010 [eluser]Tripic[/eluser] the background color works fine but i cant get a single image to show up using css and I could really use this to help clean up my template page I have tried to move the images to the view folder since atm all the css is in the view file but even with a copy of images in both the root and view directory notings working i tried using <? echo base_url(); ?> in the image paths and that did nothing to Code: <style type="text/css"> Code: <div class="menuart"> Ok Why wont any images show up for me ifrom my css - El Forum - 07-12-2010 [eluser]InsiteFX[/eluser] You can not use base_url() in a style sheet! First off you should put your css in a separate file.css Create a assets directory where the index.php file is. assets -- css -- img or images -- js Your css image links will now be: ../images/yourimag.ext Enjoy InsiteFX P.S. If you search these forums you can find asset libraries. Ok Why wont any images show up for me ifrom my css - El Forum - 07-13-2010 [eluser]jayrulez[/eluser] background: url("/images/... as opposed to background: url("images/... Ok Why wont any images show up for me ifrom my css - El Forum - 07-13-2010 [eluser]InsiteFX[/eluser] Either way will work it's just how my editor inserts thems! InsiteFX |