PDA

View Full Version : Absolute Positioning of Text in the Code


RedHotWebs
08-03-2004, 09:59/09:59AM
Hi everyone,

I'm trying to get the programmers at my new job to put the excess coding in external files so the text is located higher on the page. The top programmer said he'd rather not take the coding out, but will add a line above the text area that places the text on top through "absolute positioning". I don't quite understand it, and don't know if it's going to work for the robots.

Here's an example:
http://www.ieadagency.com/about.htm
View the source - about 1/3rd down the page is his coding line:
DIV ID="about"
STYLE="position:absolute; left:359px; top:194px; width:340px;
height:383px; z-index:1; overflow: auto"

Has anyone dealt with absolute positioning of text in the code? If so, will it help with search engine placement or is my programmer just trying to get out of doing things right? I'd appreciate your input - I don't know enough programming to feel good about this. Are there articles/info out there about "absolute positioning"? I haven't had luck finding any.

Thanks for any help you can give me.

Copywriter
08-03-2004, 10:07/10:07AM
Hi Redhot! Glad to have you here. :hi:

I'm going to move your post to the "languages" section of the forum. I think you'll get a better response in that area since it deals with programming, coding, etc.

Generally, this section is about writing the copy for your site's pages in order to make it sell better and rank better.

Karon

RedHotWebs
08-03-2004, 10:11/10:11AM
Thanks, Karon. As a newbie to this forum, I'm still learning my way around.

srikanthsh
08-03-2004, 10:54/10:54AM
That is fine. But, still you could put your styles in a separate .css file and script in .js file. On your page, I am not finding a proper reason to avoid the external files.

The same styles and javascript functions are used in all the web pages. Only one more javascript function for the form validation has been used in the contact.htm file.

RedHotWebs
08-03-2004, 11:26/11:26AM
The only reason for not having external files is that the programmers don't want to do it. I'm fighting that battle and it's going to take time to win.

But my question is about "absolute positioning" - does it work in making the robots see the text higher on the page? If so, how does it work?

Thanks for your reviewing the code, Srikanthsh. It gives me some ammo to fight the programmers with.

srikanthsh
08-03-2004, 12:12/12:12PM
Yes. What they did with the div positioning is fine. But, I never use (used) it for SEO purpose.

Convincingly, ask them if there is any technical problem with using external files. if there is any problem with that, It helps them to speak out. So that you guys, together, could decide to use it or leave it (or to fix that).

If they say that there is no problem - just tell them to do that.

Blue
08-03-2004, 14:50/02:50PM
Here's how it works RedHot:

The code (not the text that's rendered on the page) will be read top down.

So, if those DIV tags are placed above the extraneous code, in the code, they will be read first.

Also tell your programmers that by placing reusable javascripts and css into external files, they'll be speeding up load time (though maybe only fractionally) for the end user, as well as saving bandwidth for themselves.

polarmate
08-03-2004, 21:31/09:31PM
It's amazing that the programmers are saying this! If the code is placed in external files, it needs to be edited once for any change/update and the change is reflected site-wide. It's something very basic! Apart from the other benefits such as performance due to caching and better bandwidth utilization!

Don't forget to run cross-browser compatibility tests for your CSS.

WebSavvy
08-03-2004, 22:44/10:44PM
I agree (and I AM a programmer). The CSS and JS should be done through external calls.

Yes, using absolute positioning does move the text where it would be read first.

However, depending on where their graphics are, they might need to use Layering (z-order) in the positioning. When using absolute position Vs using relative positioning, they should use percentages for width so the layout will work with all screen resolutions. If they used fixed pixels, then there will be layout problems with higher resolutions if they are working only in standard 800x600.

RedHotWebs
09-03-2004, 09:02/09:02AM
That clarifies some of the coding particulars for me. Thanks.

But I'm still unclear. With absolute positioning, the text will be placed and seen higher on the viewed page. That I understand well. But will absolute positioning help the spiders find the text in the source code faster? This is what that programmer is trying to tell me and I just don't buy that. I don't see how absolute positioning will help me with the spiders and search engine ranking. Do any of you know if it will do so??

I'm sharing your input with my programmers and it's having a great effect. Thanks!

JohnC
09-03-2004, 09:14/09:14AM
My understanding is that absolute positioning will not change the order in which the spiders read the code, and therefore will not help the spiders or your SEO efforts.

As Blue said, the spiders read from top down.... Line 1 first, Line 2 second ... and so on. Absolute positioning will only change the "position" of the content in the browser window.

Your programmers are reluctant because it will be allot of work for them to rewrite the code (depending on how many pages this includes). They probably have planned out their work and in order to do this, it means their plans have to change. I think this is a common obstacle when different departments have work together. Just be aware of their workload and try and work a compromise on the timeline, if you can convince them the make the changes at all.

qwerty
09-03-2004, 10:29/10:29AM
With absolute positioning, the text will be placed and seen higher on the viewed page. That I understand well. But will absolute positioning help the spiders find the text in the source code faster?
I think this is being looked at backwards. If you want the spiders to find certain html code first, what you can do is put it in an absolutely positioned div so that you have control over its position in the browser window. Once that's done, the div can be placed anywhere you want between <body> and </body>, no matter where it displays, so it can be at the top of the code, but the bottom of the page.

That part is easy. What becomes questionable is whether it does you any good. My own site is set up that way, but I haven't seen any real advantage to it.

RedHotWebs
09-03-2004, 11:41/11:41AM
Thank you Qwerty and John. You've given me the answer I needed -- and understand! I can have the text at the top of the source code, yet place the text anywhere in the browser page with absolute positioning to meet the design requirements. We were definitely going about it backwards.

The programmers and I are compromising and working together on this now. With your input, they see there's a reason for the changes -- other than making more work for them. : )

Thank you all for straightening me out on this.