HighDots Forums  

Float Vs. Absolute (Which One Would You Use?)

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Float Vs. Absolute (Which One Would You Use?) in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
LayneMitch via WebmasterKB.com
 
Posts: n/a

Default Float Vs. Absolute (Which One Would You Use?) - 12-21-2007 , 06:34 AM






Need opinions on this because this has been bugging me.

I'm developing my first site by writing out the code first (I'll use
DreamWeaver once I have a working knowledge of HTML/CSS).

I'm redesigning my site because I've been told I used absolute positioning to
much (also I have other issues with the site as well).

It was suggested to me that absolute positioning isn't necessary and that
everything can go within the normal flow of the document and positioned by
using float (margin/padding).

Now, I want to be as precise as possible when coding. I don't want to use
excessive coding where it isn't needed. But I'm thinking that depending on
the type of site you are developing (or the complexity) - one w/ high graphic
images i.e. model sites, fashion sites vs. one that's highly text based i.e.
yahoo.com, msn.com - you would choose the type of positioning necessary.

Like entertainment sites that are image driven aren't that complex and pages
really don't have much clutter - or if this is your intent, then absolute
positioning will suffice because it makes things easier. Whereas sites with a
lot of text, columns, and images may need float positioning because if you
update the site w/ replacement images, text or w/ addtl...you don't want to
break up the flow. You want everything to be locked in as much as possible.

What are your thoughts please....

--
Message posted via http://www.webmasterkb.com


Reply With Quote
  #2  
Old   
rf
 
Posts: n/a

Default Re: Float Vs. Absolute (Which One Would You Use?) - 12-21-2007 , 06:57 AM







"LayneMitch via WebmasterKB.com" <u39402@uwe> wrote


Quote:
I'm redesigning my site because I've been told I used absolute positioning
to
much (also I have other issues with the site as well).

What are your thoughts please....
If you use absolute positioning (withing *really* knowing what you are
doing) then your page has a very good chance of breaking as soon as I
increase my font size.

--
Richard.




Reply With Quote
  #3  
Old   
rf
 
Posts: n/a

Default Re: Float Vs. Absolute (Which One Would You Use?) - 12-21-2007 , 07:04 AM




"rf" <rf (AT) invalid (DOT) com> wrote


Quote:
If you use absolute positioning (withing *really* knowing what you are
<sigh> s/withing/without/ </sigh>





Reply With Quote
  #4  
Old   
LayneMitch via WebmasterKB.com
 
Posts: n/a

Default Re: Float Vs. Absolute (Which One Would You Use?) - 12-21-2007 , 07:15 AM



rf wrote:

Quote:
If you use absolute positioning (withing *really* knowing what you are
doing) then your page has a very good chance of breaking as soon as I
increase my font size.

This is the response, I was looking for...

If you are designing a site like this.. www.kooklub.co.uk ....

You can't increase the font size because it's a highly graphical designed
site. Images are saved separately and increasing the font size would ruin the
look. This is what I mean by entertainment sites or high graphic design
dependent sites.

Using float/margin/padding may be easier (I don't know yet because I haven't
used it), but how can absolute/relative positioning ruin a site like this?

--
Message posted via http://www.webmasterkb.com



Reply With Quote
  #5  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Float Vs. Absolute (Which One Would You Use?) - 12-21-2007 , 07:49 AM



..oO(LayneMitch via WebmasterKB.com)

Quote:
rf wrote:


If you use absolute positioning (withing *really* knowing what you are
doing) then your page has a very good chance of breaking as soon as I
increase my font size.


This is the response, I was looking for...

If you are designing a site like this.. www.kooklub.co.uk ....

You can't increase the font size because it's a highly graphical designed
site.
You can't increase the font size there because the entire thing is made
with Flash.

Quote:
Images are saved separately and increasing the font size would ruin the
look. This is what I mean by entertainment sites or high graphic design
dependent sites.
Even image-heavy sites can be kept flexible if you know what you're
doing. If you need an absolutely fixed-size page, then the WWW is the
wrong medium and you should consider using PDF.

Quote:
Using float/margin/padding may be easier (I don't know yet because I haven't
used it), but how can absolute/relative positioning ruin a site like this?
Positioning doesn't have to ruin a site, but usually the boxes are laid
out in a way (fixed width, fixed height) that doesn't accomodate for a
different font size. You increase it one step and *boom* - the boxes
start to overlap. A sure sign for a broken and inappropriate design.

Micha


Reply With Quote
  #6  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Float Vs. Absolute (Which One Would You Use?) - 12-21-2007 , 07:57 AM



LayneMitch via WebmasterKB.com wrote:
Quote:
rf wrote:

If you use absolute positioning (withing *really* knowing what you are
doing) then your page has a very good chance of breaking as soon as I
increase my font size.

This is the response, I was looking for...

If you are designing a site like this.. www.kooklub.co.uk ....
"Server not found".

Quote:
You can't increase the font size because it's a highly graphical designed
site. Images are saved separately and increasing the font size would ruin the
look. This is what I mean by entertainment sites or high graphic design
dependent sites.
Imagine that some people like dressing their kids in clothes made of
attractive but highly flammable material, and want to know the best
approach to keeping them from catching fire. That's kind of what your
query is like.

These kinds of sites are all built based on the fantasy that everybody
is looking at the display using the same couple of browsers while
ignoring the considerations of Web design that make the Web an effective
vehicle for communication in the first place, including flexible design
for people whose browsers aren't as wide as the designer would like them
to be and with fonts that can be resized so that people can read them.
And the thing is that these designers imagine that only in this way can
they convey the desired impact with their designs. Well, the impact for
people who can't use their sites is zero, and their are plenty of
wonderfully design websites that don't have everything fixed like that,
so they are operating under a gross misconception.

Quote:
Using float/margin/padding may be easier (I don't know yet because I haven't
used it), but how can absolute/relative positioning ruin a site like this?


Reply With Quote
  #7  
Old   
Jeff
 
Posts: n/a

Default Re: Float Vs. Absolute (Which One Would You Use?) - 01-05-2008 , 02:55 AM



LayneMitch via WebmasterKB.com wrote:
Quote:
Need opinions on this because this has been bugging me.

I'm developing my first site by writing out the code first (I'll use
DreamWeaver once I have a working knowledge of HTML/CSS).

Ia'm redesigning my site because I've been told I used absolute positioning to
much (also I have other issues with the site as well).
Use float for almost everything, or use a table based layout. Absolute
positioning will get you in trouble.

Now lets say you have the worlds most common web design. A header
with some stuff on top. And beneath that a left nav column and beside
that, another column. What happens if either the height of the top nav
grows, or the width of the left nav widens. It'll overlap it's
neighbors, and that folks is trouble, big trouble. And what about a
footer, ow do you put that in?

Absolute positioning is easy, but requires that nothing changes in
size, and that is unlikely.


Quote:
It was suggested to me that absolute positioning isn't necessary and that
everything can go within the normal flow of the document and positioned by
using float (margin/padding).
If you can use floats, use them. All modern browsers handle them
relatively well. There are some caveats and there are quirks that can
get you in trouble. Table layouts are the most fool proof for a newbie.

The web world is changing though, and it's a good thing. Tabled layouts
are disappearing and being replaced by floated designs. I don't know of
any large site that relies on absolute positioning except for javascript
navigation where the nav is overlapped on top.

Jeff
Quote:
Now, I want to be as precise as possible when coding. I don't want to use
excessive coding where it isn't needed. But I'm thinking that depending on
the type of site you are developing (or the complexity) - one w/ high graphic
images i.e. model sites, fashion sites vs. one that's highly text based i.e.
yahoo.com, msn.com - you would choose the type of positioning necessary.

Like entertainment sites that are image driven aren't that complex and pages
really don't have much clutter - or if this is your intent, then absolute
positioning will suffice because it makes things easier. Whereas sites with a
lot of text, columns, and images may need float positioning because if you
update the site w/ replacement images, text or w/ addtl...you don't want to
break up the flow. You want everything to be locked in as much as possible.

What are your thoughts please....


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.