This Forum has been archived there is no more new posts or threads ... use this link to report any abusive content
==> Report abusive content in this page <==
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I use this code to make a background image instead of a background color?
12-12-2012, 06:54 PM
Post: #1
How do I use this code to make a background image instead of a background color?
I am making a profile on a facebook application, but I don't know much about html. I experimented by looking at the page source and found this:

<br /></div>
<br />
<br /></table>
<br /><div style="background-color: Black;">
<br /><center>
<br /><center><font size="4" color="white" font=”impact”><table style="background: transparent url("http://i532.photobucket.com/albums/ee329/siva0eminencija/untitled-1.jpg") repeat scroll 0% 0%;" valign="center" border="0" width="620" height="600"><td>


along with a bunch of other stuff. when i entered it into my profile it worked, my background became black. however, i'd like to use a background image from a url instead of just the black background? is that possible? also, is some part of this code unnecessary such as the "br"s? what do all the parts mean and how can i change them. thanks

Ads

Find all posts by this user
Quote this message in a reply
12-12-2012, 07:02 PM
Post: #2
 
For a background image use: <body background="URL">

To find the url of an image:
Firefox: Right click on the image and select "copy image location."
IE: Right click on the image, select properties, and copy the URL after the "location" header.

<br> means break, which is essentially like hitting enter on Microsoft Word.

Ads

Find all posts by this user
Quote this message in a reply
12-12-2012, 07:02 PM
Post: #3
 
Use something like this

<body background="file.jpg" bgcolor="#111111">

or

<body background-image:url("IMG URL HERE")>

br is a break in html it just makes a blank space like hitting the enter key in wordpad
Find all posts by this user
Quote this message in a reply
12-12-2012, 07:02 PM
Post: #4
 
Yes, it should work. Change the line that says:

<div style="background-color: Black;">

to:

<div style="background: url(adress of image goes here) no-repeat;">

You can change the font size- a larger number will make it bigger, a lower number will make it higher. Impact is the typeface, so you can change that but only use system fonts (the ones that came pre-loaded on your computer) or else other people might not be able to see it. I wouldn't change anything else if I were you.
Find all posts by this user
Quote this message in a reply
12-12-2012, 07:02 PM
Post: #5
 
The part "<div style="background-color: Black;">" set the background black. Change black to color you want to use. Example:

"<div style="background-color: blue;">

There's two center tags which is a no-no. Your link to image didn't come out so this is just a guess:

<center><font size="4" color="white" font=”impact”>

<table style="background: transparent url("URL of Image Here) repeat 0% 0% scroll;" valign="center" border="0" width="620" height="600"><td>

The "<br>"s are line breaks used for separation of items. Causes a break to a new line for content following it. Some may be removed, but I wouldn't even try to tell you with so little to work from. Of course, your "br />" tags didn't show up and those are done the wrong way anyway.

Font tags have been out of use for ages.

Your table is the one that has the background image in it. If it worked as you said, don't move that code to the div container.

Ron
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)