New to CMSM, BG image question & Java Script

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
highanddry

New to CMSM, BG image question & Java Script

Post by highanddry »

I have recently installed CMSMS and have started to create a template using my html page I made on my computer. I am having trouble with a few things. 

1. I cannot get my background image to show.  In the Css stylesheet it is listed at

body{

    background-image: url(mainimages/bg2.gif);
background-repeat: repeat-x;
}


I have tried using '  ' around the directory and image, I have tried not using the mainimages/  part  .. in short nothing seems to work.
The image is uploaded into the folder i created called /mainimages/

2. I have some Java script on my original 


image1 = new Image();
image1.src = "beeover.jpg";




and

 

That I am not sure how to make work...

Can someone help me out ? I find it impossible to find the answers Im looking for with a Google search.
User avatar
robsta
Forum Members
Forum Members
Posts: 131
Joined: Thu Oct 20, 2005 11:39 pm

Re: New to CMSM, BG image question & Java Script

Post by robsta »

It's no different to a standard css sheet

First find the file... ie browse to it in a web browser once you've found it you have the path...

remove everything before the first / after the domain name

ie htttp://www.spanieldorky.com/uploads/images/starty.jpg 
becomes  uploads/images/starty.jpg

This is your url as far as cmsmadesimple is concerned... the stylesheet gets loaded at root level so you don't need the preceding / on the url

So your css will look like this

background: transparent url(uploads/images/bee.jpg) repeat-x top left;

As for the javascript... its all wrong... google imageswap or css rollovers for a tutorial

R
Locked

Return to “CMSMS Core”