Page 1 of 2

Using an image as a background?

PostPosted: Mon Sep 22, 2003 4:56 pm
by jasmee98
I am new to this site, and am trying to edit my style sheet.

I noticed an attribute... background-image: url(NameOfFile),

I attempted to do this, but my image does not show up. am I doing something wrong? I tried various ways of linking the file. I am using the webdv as the base css. I added this attribute to the BODY section.

Jay

Figured it out

PostPosted: Mon Sep 22, 2003 5:05 pm
by jasmee98
I figured it out...

see http://www.pbase.com/jasmee98/test

Have only tried it with IE though.

Jay

PostPosted: Mon Sep 22, 2003 10:07 pm
by srijith
To add to the list, it works fine (as it should) in Opera 7 and Mozilla.

background-image: url() should work great with almost all good browsers, except maybe the old Netscape 4 and similar IE versions.

PostPosted: Mon Sep 29, 2003 12:24 pm
by gpwed
I love the way you did that. Can you tell me where you make these changes? I am kind of new and trying to modify one of my albums. I have some ideas but I dont know where to put the html.

PostPosted: Mon Sep 29, 2003 4:44 pm
by 99v6coupe
Please show us how that's done and your title looks great too..the fonts and everything! thank you and keep it up!

John

PostPosted: Mon Sep 29, 2003 10:19 pm
by srijith
For the side "bar" he has used the
Code: Select all
BODY
{
background-image: url(http://www.urimagehost.com/urimage.jpg);
}

within the body of his CSS.

For the "Title" he has put HTML codes ("img" being one) into the root gallery's "description" section.

PostPosted: Thu Oct 02, 2003 6:14 pm
by gpwed
When I put something in the body of my page when I am in the edit mode, it just shows up on my page, it does not change anything. I have figured out how to change colors by changeing the codes in the little boxed while in edit code. Why wont my body change??

How I did it.

PostPosted: Sat Oct 04, 2003 8:38 pm
by jasmee98
Sorry for the delay :(
Thanks for the compliments. :D

I edited an existing stylesheet, just playing with the different codes to see what they did.

See srijith's post on how I did the background. I added margins to it also so you can see the sidebar.
BODY
{
margin-left: 1in;
}


I used an image editor to make the background pic, a 1024x768 image.

I found that using Front Page helped see what all the CSS codes did.

Jay

PostPosted: Thu Oct 09, 2003 10:27 pm
by 99v6coupe
Thank you but here's what I have..still does not work. Please help, thanks.

BODY{background-image: url (http://www.pbase.com/image/22008070.jpg);}

PostPosted: Fri Oct 10, 2003 4:12 am
by srijith
99v6coupe wrote:Thank you but here's what I have..still does not work. Please help, thanks.
BODY{background-image: url (http://www.pbase.com/image/22008070.jpg);}

Try to change the URL to http://www.pbase.com/image/22008070/original.jpg

If it still does not work, maybe you can give us the URL of the album where you have tried to use this, so that we can see it in action and try to help?

PostPosted: Fri Oct 10, 2003 5:02 am
by 99v6coupe
Thanks..still doesn't work. You can see it here:

http://www.pbase.com/99v6coupe/wedding_flowers

Please help, thanks.

John

PostPosted: Fri Oct 10, 2003 5:34 am
by srijith
99v6coupe wrote:Thanks..still doesn't work. You can see it here:
http://www.pbase.com/99v6coupe/wedding_flowers

You are not doing it right! The code
Code: Select all
BODY{background-image: url(http://www.pbase.com/image/22008070/original.jpg);}

has to be placed within the body of the CSS text and not in the describtion HTML of the album. If you don't want to mess with CSS, you should try to enter this:
Code: Select all
<img src="http://www.pbase.com/image/22008070/original.jpg" />


in the description HTML.

PostPosted: Fri Oct 10, 2003 4:59 pm
by 99v6coupe
Thank you sri.
I like my current style sheet Timmyg so is there a way I can add background to this sheet? Or I have to use the custom CSS in order to add background? Thanks.

John

Re: Figured it out

PostPosted: Wed Oct 22, 2003 9:13 pm
by digipets
Looks great with the Opera Browser...gonna tell us how you did it?
Isabel

jasmee98 wrote:I figured it out...

see http://www.pbase.com/jasmee98/test

Have only tried it with IE though.

Jay

PostPosted: Wed Oct 22, 2003 10:55 pm
by srijith
99v6coupe wrote:Thank you sri.
I like my current style sheet Timmyg so is there a way I can add background to this sheet? Or I have to use the custom CSS in order to add background? Thanks.

John

You cannot add background to Timmmyg directly since you do not have the permission to edit it. So, copy the sheet content to your own sheet and edit that to add your background.