HighDots Forums  

Centering floating objects

Website Design comp.infosystems.www.authoring.site-design


Discuss Centering floating objects in the Website Design forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
OliFilth
 
Posts: n/a

Default Centering floating objects - 09-11-2004 , 11:27 PM






On the sample page at:

http://olifilth.co.uk/sample.htm

I have some span objects (the boxes) that are CSS-styled with float:
left. Whilst this allows the boxes to automatically wrap as the
browser window is resized, ideally I'd like the boxes to be centered
together on the page, rather than all pushed up to the left.

Is this possible?

Oli

Reply With Quote
  #2  
Old   
Lauri Raittila
 
Posts: n/a

Default Re: Centering floating objects - 09-21-2004 , 03:22 PM






In article <cde93941.0409112027.2e94a9ec (AT) posting (DOT) google.com>,
oli_filth (AT) hotmail (DOT) com says...
Quote:
On the sample page at:

http://olifilth.co.uk/sample.htm

I have some span objects (the boxes) that are CSS-styled with float:
left. Whilst this allows the boxes to automatically wrap as the
browser window is resized, ideally I'd like the boxes to be centered
together on the page, rather than all pushed up to the left.

Is this possible?
No, unless you know how much space on line of boxes will take.

It is possible to do differently:

..box {display:inline;display7:inline-block;display:inline-
table;width:10em;height:10em;}

Works on IE and Opera. IE because bug on display:inline handling and on
Opera as it supports CSS2 best. Use some gecko specific way to give it
float, and it works nicely. New versions of gecko might support inline-
block or inline-table, haven't checked since firebird.

http://www.student.oulu.fi/~laurirai/www/css/gallery/
Worked in mozilla 1.0, but they fixed one bug and I haven't yet updated
page. (works on IE and Opera since v5 IIRC)

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>


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.