background image not showing - Post...

User 448440 Photo


Registered User
5 posts

Hi

I'm using template 'three column fixed 2' layout from the html editor and wanted to add the 'grabag' background to it but have had no success.

i moved the grabag image file into my images folder and tried to insert the image against
'body: { background: images/grabag.jpg} but it didn't work, nothing happened?

i tried other suggesstions i got from the web:

body { background = images/grabag.jpg }
body { background: url("http://yoursite.com/images/image_grabag.gif") 50% 50% no-repeat;} they stated that this is recommended by W3C

but none of them show up as background

Here is the html code in my index.html file:

<style type="text/css" media="screen">
html, body, div, header, footer, aside, nav, article, section { margin: 0; padding: 0; }
header, footer, aside, nav, article, section { display: block; }
body { background:repeat; href="www.trekdriving.com.au"><img src="images/grabag.jpg" width="256" height="256" alt="" title="" border="0" />; color: #333; font: 11px Helvetica, Arial, sans-serif; line-height: 18px; }
h2 { color: #555555; }
a { color: #337810; }
p { margin: 0 0 18px; }
#container { width: 745px; margin: 0 auto;}
#wrapper { float: left; width: 100%; }

any help would be appreciated ......thanks Cindy
User 187934 Photo


Senior Advisor
20,271 posts

Cindy, Are you working with a gif image or a jpg.:)

body { background = images/grabag.jpg }
body { background: url("http://yoursite.com/images/image_grabag.gif") 50% 50%
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 448440 Photo


Registered User
5 posts

jpg image :/

sorry that was a typo when i referred to gif, the image is one of coffeecups from the backgrounds folder in html editor
User 187934 Photo


Senior Advisor
20,271 posts

I don't see this file or directory.:/

http://www.trekdriving.com.au/images/grabag.jpg
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 448440 Photo


Registered User
5 posts

Hi Eric

i pulled it down because i'm having issues with how it shows in mozilla...i've put the site back up...try it now http://www.trekdriving.com.au

thanks for looking at this
User 187934 Photo


Senior Advisor
20,271 posts

I set you background code like this and it worked.:)

{
background-image:url('images/grabag.jpg');
background-repeat:repeat;
background-position:right top;
}
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 448440 Photo


Registered User
5 posts

thanks Eric

that did the trick....now just have to set background colour for content area and all will be well :)
User 7096 Photo


Registered User
2 posts

Eric...in which part of the document do you post that code?
User 187934 Photo


Senior Advisor
20,271 posts

It goes in the css style sheet or in the css style reference near the top of your html doc.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 126492 Photo


Ambassador
1,525 posts

Bob wrote:
Eric...in which part of the document do you post that code?


If you are using a .css style sheet in cc html editor, then open the style.css file and look for the body { tag it may look something like this:-

body {
font-family: Arial, Helvetica, sans-serif;
font-size: 1em;
padding-top: 20px;
padding-bottom: 20px;
background-color: #919bcc;
}


Add your background image info into the section, you should then have something like this:-

body {
font-family: Arial, Helvetica, sans-serif;
font-size: 1em;
background-image: url(images/yourimage.jpg);
background-repeat: repeat;
background-position:right top;

padding-top: 20px;
padding-bottom: 20px;
background-color: #919bcc;
}


You may have to play about with the positioning depending on what size of image it is.

If you are not already using a .css stylesheet, then add the code below directly above your closing </head> tag.

<style type="text/css">
body {
background-image: url(images/yourimage.jpg);
background-repeat: repeat;
background-position:right top;
}
</style>
Jim
---------------------------

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.