Welcome Guest, Not a member yet? Register   Sign In
Ok Why wont any images show up for me ifrom my css
#1

[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">

body {
    background-color: #DDE9F7;
    
    
}
.menuart a{
    display:block;
    width: 99px;
    height: 64px;
    background: url("images/art_shoppe_up.jpg") 0 0 no-repeat;

}
.menuart a:hover {
background: url("images/art_shoppe_down.jpg") 0 0 no-repeat;
}


</style>
Code:
<div class="menuart">
</div>
#2

[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.
#3

[eluser]jayrulez[/eluser]
background: url("/images/...

as opposed to

background: url("images/...
#4

[eluser]InsiteFX[/eluser]
Either way will work it's just how my editor inserts thems!

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB