Board index PBase HTML and Style Sheets Using an image as a background?

HTML and Style Sheets

Using an image as a background?

Customize your galleries.
jasmee98
 
Posts: 33

Using an image as a background?

Post Mon Sep 22, 2003 4:56 pm


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

jasmee98
 
Posts: 33

Figured it out

Post Mon Sep 22, 2003 5:05 pm


I figured it out...

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

Have only tried it with IE though.

Jay

srijith
Moderator
 
Posts: 2321
Location: Amsterdam


Post Mon Sep 22, 2003 10:07 pm


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.

gpwed
 
Posts: 21


Post Mon Sep 29, 2003 12:24 pm


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.

99v6coupe
 
Posts: 25


Post Mon Sep 29, 2003 4:44 pm


Please show us how that's done and your title looks great too..the fonts and everything! thank you and keep it up!

John

srijith
Moderator
 
Posts: 2321
Location: Amsterdam


Post Mon Sep 29, 2003 10:19 pm


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.

gpwed
 
Posts: 21


Post Thu Oct 02, 2003 6:14 pm


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??

jasmee98
 
Posts: 33

How I did it.

Post Sat Oct 04, 2003 8:38 pm


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

99v6coupe
 
Posts: 25


Post Thu Oct 09, 2003 10:27 pm


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);}

srijith
Moderator
 
Posts: 2321
Location: Amsterdam


Post Fri Oct 10, 2003 4:12 am


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?

99v6coupe
 
Posts: 25


Post Fri Oct 10, 2003 5:02 am


Thanks..still doesn't work. You can see it here:

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

Please help, thanks.

John

srijith
Moderator
 
Posts: 2321
Location: Amsterdam


Post Fri Oct 10, 2003 5:34 am


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.

99v6coupe
 
Posts: 25


Post Fri Oct 10, 2003 4:59 pm


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

digipets
 
Posts: 9

Re: Figured it out

Post Wed Oct 22, 2003 9:13 pm


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

srijith
Moderator
 
Posts: 2321
Location: Amsterdam


Post Wed Oct 22, 2003 10:55 pm


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.

Next

Board index PBase HTML and Style Sheets Using an image as a background?

Who is online

Users browsing this forum: No registered users and 2 guests