Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Positioning or float?
Old 08-15-2008, 09:05 AM Positioning or float?
Average Talker

Posts: 22
Name: Bob
Trades: 0
I've been reading discussions about the merits or otherwise of positioning vrs float. Those who favour postioning seem to argue it:
(A) has a faster download time
(B) is easier to fix columns in place in more than 2 column layouts.

Those who favour float argue:
(A) page content is not 'hidden' if the page is resized
(B) download speed is only affected there are a huge number of floats (according to one site)

Page rendering was also mentioned, but I'm not yet sure about the distinctions between rendering and download speed and the significance of it for the end user of the site. If anyone knows, please tell me.

I'm not sure who holds the stronger perspective between float and position. So I'm very interested to know the views and reasons for favouring one over the other from people on this site.
goodness me is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-15-2008, 10:13 AM Re: Positioning or float?
MatrixIT's Avatar
Skilled Talker

Posts: 85
Name: Dan
Trades: 0
I favour floats mainly for the reason of browser compatibility - they appear almost identical in IE and FF whereas absolute positioning can cause serious problems in one or the other
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
MatrixIT is offline
Reply With Quote
View Public Profile
 
Old 08-15-2008, 10:50 AM Re: Positioning or float?
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Absolute positioning has faster download time? I can't imagine why that would be true. HTML markup takes very little time to download as it is, and more code is not required for floats vs. absolute positioning.

For columns, I always use floats. I only use absolute positioning when I need to "nail down" an element that is within a box of fixed dimensions, or is otherwise positioned in an unusual manner (like overlapping part of the page). I also sometimes use it for convenience when constructing "CSS image-maps", which are incredibly easy to create with Firebug.

It is important to understand both positioning and floats, as they are both good tools. I also believe it is important for novices not to use absolute positioning for a while, until they understand floating completely, as well as realize the distinction and relationship between absolute and relative positioning.
__________________
Join me on
Please login or register to view this content. Registration is FREE

Last edited by wayfarer07; 08-15-2008 at 10:52 AM..
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 08-15-2008, 11:03 AM Re: Positioning or float?
thehuskybear's Avatar
Ultra Talker

Posts: 362
Name: Sam
Location: Tucson, AZ
Trades: 1
I rarely used positioning, unless I need something positioned perfectly. Usually I can accomplish the same thing using margins and padding. I prefer float because I have found it to be more flexible and cross browser compatible.

Positioning is great if you are working entirely with fixed widths, but you have to be careful... and as always make sure to test on several browsers, because the result can be unexpected..
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
thehuskybear is offline
Reply With Quote
View Public Profile Visit thehuskybear's homepage!
 
Old 08-15-2008, 03:12 PM Re: Positioning or float?
angele803's Avatar
Perfectly Imperfect

Posts: 1,774
Name: Stephanie
Location: Oklahoma
Trades: 2
Absolute positioning can be a nightmare. I only use it when I really really need to, and then, I (usually) use it inside of a relatively positioned container div.
You shouldn't really take things out of the natural flow of the document when you don't have to.
Despite what you might think, absolutely positioning everything can cause some seriously unexpected results.
I don't think using absolute positioning can possibly cause a page to load faster. If anything, I would think it would slow a page down. I think it would slow down load times because you are taking things out of the document flow.
I can't wait to hear what ladynred has to say about this topic. I know she will have some great info!
__________________

Please login or register to view this content. Registration is FREE
angele803 is offline
Reply With Quote
View Public Profile
 
Old 08-15-2008, 04:13 PM Re: Positioning or float?
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
You may or may not have found this information:
http://css-discuss.incutio.com/?page=CssPositioning
and this goes with it: http://css-discuss.incutio.com/?page...ppingAndZIndex

IE in particular is a real pain with absolute positioning. IE7 and 8 shouldn't have the same problems though.

I prefer floats, for the same reason others have stated - more flexible, less cross-browser problems.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-16-2008, 07:11 AM Re: Positioning or float?
Average Talker

Posts: 22
Name: Bob
Trades: 0
MatrixIT, wayfarer07, thehuskybear, angele803, LadynRed,

Every time I come here, i'm just amazed at how lucky I am to have found this forum. Thank you all for helping me out; I've learned quite a bit from your postings.

Ladynred, I've read the articles you suggested and I found them very informative. And as with other articles you've put forward, it sends me off on a research quest.

This time the code for a dropdown horizontal menu caught my eye but didn't work when I tried it. I concluded (not sure if I'm right here) the menu needed some javascript.

Since I'm still coming to grips with css, I looked around for a pure css dropdown menu. The best example for me (I've yet to try it out because I'm still reading the code to better understand it) came from
(http://mice.org/pure_css.html) which explained Steve Gibson of Gibson Research (CRC.com) pure CSS drop down menu stylesheet that's been put in the public domain.

As I understand it, this code is very stable across different browsers both new and old and is genuinely pure css.

Again, thanks for your help everyone.
goodness me is offline
Reply With Quote
View Public Profile
 
Old 08-16-2008, 08:51 AM Re: Positioning or float?
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
@goodnessme:
You may want to also check out suckerfish style dropdowns, they are fairly easy to understand. All CSS based dropdowns function similarly to them. It must be noted, however, that IE6 requires a speck of JavaScript to "kick start" it into working, since it doesn't recognize the :hover selector on anything other than an anchor element.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 08-16-2008, 09:41 AM Re: Positioning or float?
Average Talker

Posts: 22
Name: Bob
Trades: 0
wayfarer07,

Thanks for directing me to the site. I've just been there; you're absolutely right wayfarer07. it is easier to understand - except the javascript.

I'm not quite sure about javascript; it's a function so I'm guessing when the menu is used the webpage reaches out for javascript to do the hover job for it. I understand the line var sfEls= document.getElementByID("nav"). GetElementByTagname("L"i), but I only vaguely get the rest of it.

I tried it out using ie6 (in offline mode) and Norton on my computor seemed to block the javascript content. Yet when I try out the examples given by Suckerfish through their site, they work. How come? I'm sure I must be doing something wrong.

I look forward to your reply, but I have to go to bed now. Thanks wayfarer07.
goodness me is offline
Reply With Quote
View Public Profile
 
Old 08-22-2008, 12:52 AM Re: Positioning or float?
Junior Talker

Posts: 2
Name: Papedsko Demarzio
Trades: 0
Agree, I favour floats mainly for the reason of browser compatibility...
__________________
Regards:
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
papedsko is offline
Reply With Quote
View Public Profile Visit papedsko's homepage!
 
Old 08-26-2008, 05:13 AM Re: Positioning or float?
seomax's Avatar
Skilled Talker

Posts: 65
Name: Mahendra Rajeshirke
Location: India
Trades: 0
i use float instead of positioning, cause of different browser variation
__________________

Please login or register to view this content. Registration is FREE

Last edited by seomax; 08-26-2008 at 05:15 AM.. Reason: added text
seomax is offline
Reply With Quote
View Public Profile
 
Old 08-27-2008, 06:16 AM Re: Positioning or float?
Banned

Posts: 52
Name: Dang N
Location: Rowlett Tx
Trades: 0
i would prefer float, it works much better and positioning sometimes does not function correctly in IE
Dangmnx is offline
Reply With Quote
View Public Profile Visit Dangmnx's homepage!
 
Reply     « Reply to Positioning or float?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.47070 seconds with 12 queries