Jump to content



Latest News: (loading..)

Adding Background


  • Please log in to reply
6 replies to this topic

#1   swilson

swilson
  • Members
  • 10 posts
  • Real Name:Sid Wilson
  • Gender:Male
  • Location:Indianapolis, Indiana

Posted 19 April 2009 - 04:07 PM

I am a newbie to osCommerce with a little PHP history.

After reading previous topic on the subject, I added:

BODY {
background-image : url(/images/black-bg.jpg);
background-repeat : no-repeat;
background-position : 50% 50%;
background-attachment : fixed;
color : #000000;
margin : 0;
}

to the style sheet and it work on only some of the pages but not all. The others still show up white.
Does anyone have any ideas what is wrong and how can solve this?

example: Lyodi.Com

Thanks.    :huh:

Edited by swilson, 19 April 2009 - 04:11 PM.


#2   freeoscommerce

freeoscommerce
  • Members
  • 5 posts
  • Real Name:Zachary Coyne
  • Gender:Male
  • Location:Tucson, AZ, USA

Posted 19 April 2009 - 10:28 PM

Hi,

Looks like the pages that are showing up with the black background are doing so because this is in the body tag:

<body  bgcolor="#000000" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000" marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

...not because you changed the stylesheet.

You need to remove that stuff from the body tag (change these things with CSS)...

Then, in your stylesheet, remove the '/' in front of images

background-image : url(/images/black-bg.jpg);

should be...

background-image : url(images/black-bg.jpg);

#3   swilson

swilson
  • Members
  • 10 posts
  • Real Name:Sid Wilson
  • Gender:Male
  • Location:Indianapolis, Indiana

Posted 20 April 2009 - 01:12 AM

Thank you so much with your help. I am going to try it right now and let you know what happens.

Thanks again!  :blush:

#4   spooks

spooks
  • Members
  • 7,017 posts
  • Real Name:Sam
  • Gender:Male
  • Location:UK

Posted 20 April 2009 - 01:25 AM

could'nt view page as your ads prevented page load completing, delete them.

use tools in firefox, they show css errors.
Sam

Remember, What you think I ment may not be what I thought I ment when I said it.

Contributions:


Auto Backup your Database, Easy way

Multi Images with Fancy Pop-ups, Easy way

Products in columns with multi buy etc etc

Disable any Category or Product, Easy way

Secure & Improve your account pages et al.

#5   swilson

swilson
  • Members
  • 10 posts
  • Real Name:Sid Wilson
  • Gender:Male
  • Location:Indianapolis, Indiana

Posted 20 April 2009 - 03:03 AM

I had to go the long way of doing it but it is working.

About the ad. Thanks for letting me know Sam. It does works find on internet explorer but I do need to try it in firefox as well.

What I did is this:

BODY {
  background: #000000;
  color: #000000;
  margin: 0px;
}

and then everytime there was to much black, like inside the tables, I added to the tables on each problem page this:  bgcolor="#ffffff" in the table code.

This is probably the long way of doing it but if anyone knows an easier way, Please speak up! All the help is deeply appreciated.

Thanks for the replies.

#6   swilson

swilson
  • Members
  • 10 posts
  • Real Name:Sid Wilson
  • Gender:Male
  • Location:Indianapolis, Indiana

Posted 21 April 2009 - 01:13 AM

I fixed it with a blue background like this:

BODY {
background : url [ images/blue-bg.jpg ] ;  
color : #000000;
margin : 0;
}

It works on Internet Explorer but I haven't seen it on any other broswers yet. I am trying out Firefox next.

Please take a look at it and let me know what you think. I am still new at this.

Visit My Website

Thanks for all your help.   :lol:

#7   swilson

swilson
  • Members
  • 10 posts
  • Real Name:Sid Wilson
  • Gender:Male
  • Location:Indianapolis, Indiana

Posted 21 April 2009 - 01:14 AM

I fixed it with a blue background like this:

BODY {
background : url [ images/blue-bg.jpg ] ;  
color : #000000;
margin : 0;
}

It works on Internet Explorer but I haven't seen it on any other broswers yet. I am trying out Firefox next.

Please take a look at it and let me know what you think. I am still new at this.

Visit My Website

Thanks for all your help.   :lol: