Академический Документы
Профессиональный Документы
Культура Документы
(Author : unknown)
D esigning with HTML is not that difficult but it has to be done one step at a time.
You make one change, then another and before long, your page changes completely. Start
by formatting the text or adding single images. I will be happy to answer your queries
and help you regarding HTML and how to customise and decorate your page, but please
Read the Help first before asking questions.
Facebook's POST script removes many tags, therefore there are limitations on what could
be included. Editing is done in the About ME section which you access by clicking on
the Edit Description.
• Do not post codes directly in a wall post for me to check as they can not be seen as
code.
• Applying Style
Facebook uses XHTML Strict and for better compatibility, XHTML tags should be used.
In XHTML all formatting is done in the style="".But, basic tags like <b>bold</b>,
<i>italic</i>, are allowed. Underline (<u>underlined</u>) is deprecated since it gets
confused with links.
You can add the style to msot tags like: <div></div> or paragraph <p></p>
• Start Here
This is the basic starting point that I usuaully use.
</div>
<br />
• Colour in HTML
Colours can be added as HTML Named Colours, or hex values preceded by #, for
example #000000 means black. There is also a shorthand version of it (that I like to use)
which is #000. Shorthand hex would duplicate each value, therefore #abc is the same as
#aabbcc. XHTML requires the use of lowercase characters although both will be
acceptable. Third method is to use RGB values (which I never use).
To start, I am going to explain how to style the entire About Me. You can apply the
styling to sections of it too, once you understand the process.
First Step: Insert <div style=""> right at the start of your About Me and </div> right at
the end. It is VERY important that you don't forget the end part or else you may break the
HTML of the whole page. At this point, there is no change to the display until you add
the required style to the style="" part of the <div style="">
• Background Explanation:
background-color: This is the background colour which like previous section could be
name, hex, RGB, etc. It could also be set as transparent.
background-image: The location of the image on the Internet.
background-repeat: Sometimes you want the image to be repeated i.e. like tiles, or you
don't want to repeat it, or you only want to repeat it vertically or horizontally. Usual
values: repeat | repeat-x | repeat-y | no-repeat
background-attachment: This is to set if the background scrolls or not. Usual values:
scroll | fixed
background-position: This will set where the image is placed. It can be in percentage,
length or set words. Usual values (first the vertical and second the horizontal): top | center
| bottom & left | center | right
If any of these attributes are not set, the default value will be used which is: repeat top
left scroll
</div>
• Line Breaks
Use the line break tag so that your text/image etc would move to the next line. Use Two
break tags, one for break and the second for a line gap/space if you want it.
• Adding Links
Link Example:
<a href="Link to the page">Text that people can click</a>
• Adding Images
To add images, you simply use the image tag. If you wish to add a link also, you enclose
the image tag with the link tag. Depending on the browser you use, to find the location of
the image, just right click on the image, choose property and copy the address (or copy
image location in Firefox).
Note: It is a bad idea to upload images that are available on facebook to 3rd party image
sites. FB caches images and they load a lot faster. I have seen some pages that are a meter
long. In my view, any page that requires more than 3 scrolls, is too long.
Explanation:
href= Link to the person's page
src= location (URL) of the image on the internet
alt= Text that will be displayed if image could not be loaded, could be left blank, or put
the name of the person
title= Text that would be displayed when people mouse their mouse over the image,
could be left out, or put the name of the person
Finished............
I centre the contents inside it, but if you are going to have text inside, it is better to use a
paragraph tag and centre that too. I add a little padding so things don't get stock to the
edges which I think is ugly. Without the scrollbars, 7 images will line nicely, with them
maybe six. Therefore put a Line Break after every 7 sets.
I prefer to use the small thumbs, but you can use any image size that you wish. FB
images come in 4 usual formats: /n (200 x **), /s (100 x **), /t (50 x **) and /q (50 x 50).
I change the starting to /q which gives you a 50 x 50 images, so all images are the same
size. Can you see? /t changed to /q
For example:
http://profile.ak.facebook.com/v225/1615/26/t533757004_605.jpg
Change to:
http://profile.ak.facebook.com/v225/1615/26/q533757004_605.jpg
Filled Example:
<a href="http://apps.facebook.com/friendsforsale/users/show/100729935"><img
src="http://profile.ak.facebook.com/v229/625/56/t1457104438_6465.jpg" alt="Amir
Faryar Zahedi" title="Amir Faryar Zahedi" /></a>
• Resizing Images
The About Me is 488pixels wide. I usally set bigger images to width="440". You can give
a dimension which forces the browser to scale the image. Imagine original image is
500px × 300px which is too big to fit into the about Me section.
Example:
<img src="http://.............gif" width="250" alt="" />
The 250 forces the browser to scale the image by 250/500 or 50%.
Explanation:
left: This property specifies how far a box's left content edge is offset to the right of the
left edge of the box's containing block.
top: This property specifies how far a box's top content edge is offset below the top edge
of the box's containing block . A negative figure would mean higher than the edge.
right: This property specifies how far a box's right content edge is offset to the left of the
right edge of the box's containing block.
bottom: This property specifies how far a box's bottom content edge is offset above the
bottom of the box's containing block.
Now, if you increase the negative 'top'..it goes up; decrease it and it goes down, so top:
-400px is higher than top: -350px
If you increase the 'left' it goes right, if you decrease it, it goes left. So left: 300px will be
more to the right than left: 200px. Depending on the width of the image, value bigger
than left: 700px would put the image outside the page.
Method 1: Pages often take time to load and images come after the text. While page is
loading and before the images have loaded, quickly click the Edit Description or hit
STOP.
For Firefox:
Other browsers have similar options. Now the browser does not show any images, so the
troublesome image will not show. Go to your page, click Edit Descriptions and remove
or change the position of the image. You need to change the left and top settings, more
negative top, moves it higher, more positive left, moves it further to the left. Once saved,
go back and restore browser settings. Sometimes IE show a blank box for the missing
image, in that case, Hold Ctrl+F5 to force refresh the page and if the box is still there,
you need to try with another browser.
Method 3: Finally, if you are still unable to fix the problem, then you can:
a) Ask a Moderator to reset your About Me (everything will be deleted)
b) PM message me your user/pass and I fix it for you (New facebook security makes that
very difficult)
• Adding Scrollbars
There are times that the section is becoming too long. Like what you see on this page, I
have added scrollbars since the FFS Help and HTML Help sections are very long.
In order to have compatibility with older browser that do not support overflow-y which is
CSS3, I have added the overflow: auto; and made overflow-y !important;
On the examples on my page, I only set the height since I wanted the width to fill the
entire section. It is possible to set the width too, if desired.
Example:
<div style="height: 400px; overflow: auto; overflow-y: scroll !important;">
--- the scrolling section ---
</div>
In this example, the total height of the section is fixed at 400 pixels and since it contains
text which will automatically wrap, there would not be any horizontal scrolling. It is
possible to strings a set of images without spaces which would result in horizontal
scrolling. The use of horizontal scrolling is more limited and it is generally considered to
be ugly.
Scroll-bar Colours:
Scrollbar colours are not standard HTML/CSS and they are not fully supported by all
browsers. I personally don't use them.
To set the width, add it as a style i.e. <td style="width: 100px;">. Remember that once
you set a width for a cell, all cells under it (the column) will have that width. So you only
have to set it for the <td> of the FIRST row.
• Gift Wall
Note: With so many gifts available now, the gift wall will soon become very bulky and
be affected by the About Me Bug.
It is not a good idea to copy and paste the source code from the gift section of the
FFS as they use floats to position items. Using floats on ONE item is fine, but using them
on multiple items are very complicated and if not closed properly, they would run out of
the About Me and over the minifeed section. The easiest way is to use a table and you can
easily get 5-6 in a row. Once you get more, you add another row. Don't forget that since
this table (for example) has 5 columns, for the next row, you need to have 5 columns too
and if you don't have enough roses, you must add blank cells <td> </td> to make
up for the missing ones. I have used an alternative image which has a transparent
background. Same principle can be followed for Hearts, Tiaras and anything else.
Here is an example of a Rose Wall that you can fill and carry on the next rows:
<tr>
<td style="vertical-align: bottom;"><a
href="http://apps.facebook.com/friendsforsale/users/show/100729935"><img
src="http://profile.ak.facebook.com/v229/625/56/t1457104438_6465.jpg" alt="Amir
Faryar Zahedi" title="Amir Faryar Zahedi" /></a></td>
<td style="vertical-align: bottom; color: red; font-size: 1.5em; padding-right: 20px;">
<img src="http://67.228.233.11/images/gifts/engagement-ring.png" alt="" height="35" />
x1<br />
<img src="http://67.228.233.11/images/gifts/rose2.png" alt="" height="35" /> x5
</td>
</table>
Code to use: