When customizing a myspace page, Absolute Placement Should ONLY be used when you can reasonably Control the size and placement, of the content you are measuring, to do the placement.
Often I see posts (in various forums) indicating that someone's page looks great on their computer, but their friend claims it is mis-aligned when viewed on the friend's computer. Sometimes they are using the same browser other times they are not.
Sometimes it is different operating systems.
[if it is a different browser issue; on the same computer, often this is due to problems with incorrect tag nesting and div sizing (and how each browser handles the error conditions), but I am not covering that in this article, so I will move on.]
Sometimes the problem is caused by an assumption that all one has to do, to get absolute placement correct, is to play with (and adjust) the numbers until it looks right. This is only true if all those viewing the page are using the same browser, resolution, and dpi settings.
The problem is, the myspace default page content is NOT sized using set pixel sizes and absolute placement. It is sized using table cells which auto expand to accommodate content. Font sizes are often not set by px height, carriage returns are often not set to a specific px height, and column width sizing (which effects column height for many types of content) is not consistent. The size of the content is often dependent on a combination of the following:
Resolution
DPI setting
Browser software
and more ...
[note to self: add some examples here, showing how, even with minimal page content, the absolute position of the content can vary significantly.]
This does not mean that I never use (or recommend) Absolute placement, as a way of placing objects on the myspace page. It is only when it is mixed with placement dependent on other things, that it becomes a problem. In this case I recommend keeping the actual px values as small as you can, and doing the movement over a path that is sized as consistently as possible. (i.e. when given a choice of paths, pick the one with the most consistent sizing).
Things you do NOT need Absolute (or Relative) Placement for
1) Centering Friends And Comments (This can be done by closing and opening tables)
(Centering just the comments is one which does need absolute or relative placement)
2) Putting a Video or Link in place of the Blogs and/or Extended network (With one exception)
3) Putting a Link or custom text (which is not an image) in place of the URL box.
4) Getting a Custom Div to place itself neatly under the Ad Banner (and any top menus you choose to keep) and neatly above the bottom links.
When Is Absolute (or Relative) Placement A good Solution Choice?
1) Where there is not a better way to accomplish the task
2) When the measurement, required for the movement, is over a small and/or consistently sized area.
i.e. Measurement from the top of the page, to place something just below the ad banner or top menu usually works o.k. However watch the top menu, it sometimes goes to a 2nd line increasing its depth. I usually set the font very small to avoid this.
i.e. Moving a block up slightly. Often this is easier than trying to remove all the carriage returns and clear gifs causing whitespace.
If you find that you must use absolute (or relative) placement, to move an object, There are some ways to control the sizing problem.
1) Add code to control the size of the objects you must measure over. The size of the carriage return tends to vary a lot. It can be hard set using line-height.
The height of table cells can be hard set using line-height.
The height of tables can be set, as long as you allow for all the expected content.
In many cases you can override the auto sizing of the content, and control the size to some degree.
2) Keep the px values small (if possible).
3) Measure from the closest outer container possible. Container nesting often improves appearance.
There may be a way to create an outer container using the existing table structure, and then place items within the container, using absolute placement relative to the container instead of the page body.
For example, if I want to create a custom Div, I can create my initial Div, such that it naturally falls just under the Ad banner (or the top menu if I choose) without any reliance on absolute positioning. I do this by closing tables, placing my div, and re-opening tables. If I style the div correctly, I can now use this div as the outer container, and position my remaining objects within it, using it as a reference point.
top:0px; right:0px
Now represents the top right corner of my outer div, instead of the top right corner of the page.
Note: If you are placing a div directly under the advertisement, or even the block containing the ad banner and google search, AND removing the bottom links, Absolute placement does work well. The ad banner is sized, using an exact px height.
Just make sure you use code to hide the bottom links, which does not mess with the ad banner.
[more later ...]
Wednesday, June 20, 2007
Subscribe to:
Post Comments (Atom)
About Me
- u∃∃l!∃
My name is Eileen.
I live in Corvallis Oregon (for now).
My job is moving to Austin Texas and I may move with it).
I have Aspergers (a type of high functioning autism).
In my case it is not a disability; it gives me as many strengths as it does weaknesses.
However, communicating with Neuro Typicals is a challenge for me. So if we do not understand each other, it is not because I dislike you, think you are stupid, or anything else negative. We just think differently.
0 comments:
Post a Comment