Board index PBase HTML and Style Sheets Background Image

HTML and Style Sheets

Background Image

Customize your galleries.
happypoppeye
 
Posts: 121

Background Image

Post Wed Feb 04, 2009 12:12 am


Still messing around and trying to learn. I want to put a background image on a page and am using:

background: #000000;
url(http://i.pbase.com/o6/16/841416/1/10884 ... ipJ.bg.jpg);
center no-repeat fixed;


My question is - where do I put it?

Thanks
John

dang
 
Posts: 3780

Re: Background Image

Post Wed Feb 04, 2009 2:04 am


Hi John,
The type code you're trying is CSS, which would be used in the Style Sheet. However, if you only want to place a banner at the top on one gallery, or use different banners in various galleries, you could place a different code in the gallery description area instead.
For that, add the below code and check the box under the description which says, "check here if using html".

Code: Select all
<p align="center">
<img src="http://www.pbase.com/dang/image/100992531/original.jpg" alt="logo" border="0"></a></p>


In the code you're showing, you've added the "Properties" url, which shouldn't be used. Images are sometimes transferred between servers, and the number will change. It's best to use the Browser url (as shown above - replace with yours) to avoid having a red x if change occurs.

happypoppeye
 
Posts: 121

Re: Background Image

Post Wed Feb 04, 2009 4:06 am


Dang,

Thanks for that but I am actually trying to put wallpaper behind the whole image. I may have worded it a bit confusing.

Thanks
John

dang
 
Posts: 3780

Re: Background Image

Post Wed Feb 04, 2009 4:25 am


Oh, okay...
You'll add it to the "body" section of your style sheet CSS:
Code: Select all
body
{ text-align:center;
   margin-bottom: 20px;
   margin-top: 0px;
   background: #000000;
url(http://i.pbase.com/o6/16/841416/1/10884 ... ipJ.bg.jpg);
center no-repeat fixed;


:wink:

happypoppeye
 
Posts: 121

Re: Background Image

Post Sat Feb 07, 2009 2:30 am


Thanks Dang - I actually still can't get it to work but I know it is my understanding of your explanation instead of your explanation. Instead of asking you to explain I'm gonna just mess around until I figure it out. At least I'll learn something that way instead of just asking here for everything. If I really can't figure it out and get frustrated I'll ask again.

Thanks
John

dang
 
Posts: 3780

Re: Background Image

Post Sat Feb 07, 2009 3:34 am


You're welcome, John.
If you're just starting to work on styles, I highly recommend using Firefox with it's Web Developer Tool Bar. Really makes things much simpler. Arjun has a wonderful tut in the "Sticky" posts, here: viewtopic.php?f=8&t=13408

Good luck, and have fun.

happypoppeye
 
Posts: 121

Re: Background Image

Post Sat Feb 07, 2009 6:03 am


Dang - yes - that is what I have been working with. I have absolutely no experience with Css or html but have learned alot in the two weeks I"ve been messing with it. It's actually pretty fun. The only problem is I have been messing around with it so much I haven't had time to post any photos.

Thanks again,
John

gstvincent
 
Posts: 2

Re: Background Image

Post Sat Apr 11, 2009 6:09 am


Hello Dang,

Thanks for the hint, it is very appreciated. I have a problem though. When I click on a picture in my main page, of course a new window appears with the selected picture and also the background image in the back of the selected picture. I would like to avoid seeing the backgroung image in the back, how can I do that? What modification should i bring to the code?

Guy


dang wrote:Oh, okay...
You'll add it to the "body" section of your style sheet CSS:
Code: Select all
body
{ text-align:center;
   margin-bottom: 20px;
   margin-top: 0px;
   background: #000000;
url(http://i.pbase.com/o6/16/841416/1/10884 ... ipJ.bg.jpg);
center no-repeat fixed;


:wink:

dang
 
Posts: 3780

Re: Background Image

Post Sat Apr 11, 2009 9:15 am


Hello Dang,

Thanks for the hint, it is very appreciated. I have a problem though. When I click on a picture in my main page, of course a new window appears with the selected picture and also the background image in the back of the selected picture. I would like to avoid seeing the backgroung image in the back, how can I do that? What modification should i bring to the code?

Guy


Hi Guy,
Honestly, I have no idea since images share the same style sheet as the gallery page. This isn't to say it's not possible, just that I've never tried before, and I'm personally not willing to invest the time to see if it can be done. You can however, move a smaller image around within the page, by simply changing it's position as such:

center no-repeat fixed; TO: top-right, bottom-left and so on.

You can also use a small image, and make it repeat by changing no-repeat to repeat. There's also a few other simple things, but coding could become difficult to do what you're asking.

Sorry I can't be of more help, maybe someone else has an answer?

Have fun.

gixmi
 
Posts: 1

Re: Background Image

Post Wed Jun 17, 2009 11:43 am


thank you dang, your code is best to use the Browser of Both IE and Firefox. :)


Board index PBase HTML and Style Sheets Background Image

Who is online

Users browsing this forum: No registered users and 2 guests

cron