HighDots Forums  

How to center 1 to n floating div boxes on a page?

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


Discuss How to center 1 to n floating div boxes on a page? in the Cascading Style Sheets forum.



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

Default How to center 1 to n floating div boxes on a page? - 06-30-2008 , 07:25 AM







I’m trying to create a page, so that if one has a widescreen monitor,
they will be able to see as many centered divs on a row as possible.
So I’m floating these div boxes left so they are not stacking
vertically, but horizontally. The problem is, they don’t center. Do
you know a way do to it with CSS.

Thanks

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

Default Re: How to center 1 to n floating div boxes on a page? - 06-30-2008 , 08:04 AM






In article
<3a9bb275-e071-4e17-afaf-99159c2cebae (AT) y38g2000hsy (DOT) googlegroups.com>,
bay <bay_dar (AT) yahoo (DOT) com> wrote:

Quote:
I¹m trying to create a page, so that if one has a widescreen monitor,
they will be able to see as many centered divs on a row as possible.
So I¹m floating these div boxes left so they are not stacking
vertically, but horizontally. The problem is, they don¹t center. Do
you know a way do to it with CSS.

No, you can't perfect centre with css as I understand you want. You can
get awfully close but.

But there is a way with some extra:

<http://tinyurl.com/2jcs5r>

--
dorayme


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

Default Re: How to center 1 to n floating div boxes on a page? - 07-01-2008 , 08:56 AM



Cool, it worked, but I had to fix the Javascript for it to work in IE
for some reason. Worked in FF fine.

Quote:
No, you can't perfect centre with css as I understand you want. You can
get awfully close but.

But there is a way with some extra:

http://tinyurl.com/2jcs5r

--
dorayme


Reply With Quote
  #4  
Old   
dorayme
 
Posts: n/a

Default Re: How to center 1 to n floating div boxes on a page? - 07-01-2008 , 06:07 PM



In article
<db4c1dd2-ef59-4900-ba33-208c373712ac (AT) m73g2000hsh (DOT) googlegroups.com>,
bay <bay_dar (AT) yahoo (DOT) com> wrote:

Quote:
Cool, it worked, but I had to fix the Javascript for it to work in IE
for some reason. Worked in FF fine.

No, you can't perfect centre with css as I understand you want. You can
get awfully close but.

But there is a way with some extra:

http://tinyurl.com/2jcs5r

Feel free to give a URL so that your js could be traced by us all, it
might prove useful. I have clean forgot now if the mass of floats as a
whole centred properly in Internet Explorer, I think I would have
checked in IE6 at the time, but likely not in IE7? The javascript on
those pages at my URL is named in honour of its maker. And it was
fashioned probably with the details of my page in mind. So anything you
come up with that makes it more general would likely be helpful.

--
dorayme


Reply With Quote
  #5  
Old   
BootNic
 
Posts: n/a

Default Re: How to center 1 to n floating div boxes on a page? - 07-02-2008 , 12:21 AM



On Wed, 02 Jul 2008 09:07:43 +1000
dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote in:
<doraymeRidThis-948361.09074302072008 (AT) news-vip (DOT) optusnet.com.au>

Quote:
In article
db4c1dd2-ef59-4900-ba33-208c373712ac...oglegroups.com>,
bay <bay_dar (AT) yahoo (DOT) com> wrote:

No, you can't perfect centre with css as I understand you want. You
can get awfully close but.

But there is a way with some extra:

http://tinyurl.com/2jcs5r

Cool, it worked, but I had to fix the Javascript for it to work in
IE for some reason. Worked in FF fine.


Feel free to give a URL so that your js could be traced by us all, it
might prove useful. I have clean forgot now if the mass of floats as
a whole centred properly in Internet Explorer, I think I would have
checked in IE6 at the time, but likely not in IE7? The javascript on
those pages at my URL is named in honour of its maker. And it was
fashioned probably with the details of my page in mind. So anything
you come up with that makes it more general would likely be helpful.

CSS version. I did not even try to make this work with older mozilla
type browsers. Not really the same but close, and no js.

http://tinyurl.com/637o7j



--

BootNic Wed Jul 2, 2008 01:21 am
"I suppose they are vicious rascals, but it scarcely matters what they
are. I'm after what they know."
*Gibson-Sterling, The Difference Engine*

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkhrEF0ACgkQylMUzZO6jeIL0ACgwdaPrpk75k 76QHY5ta+f5bVh
EWEAn1xFRQ+W08Cln8419Ew4vKM/A8gW
=aG24
-----END PGP SIGNATURE-----



Reply With Quote
  #6  
Old   
dorayme
 
Posts: n/a

Default Re: How to center 1 to n floating div boxes on a page? - 07-02-2008 , 12:58 AM



In article <20080702012129.773f3fe3 (AT) bootnic (DOT) motzarella.org>,
BootNic <bootnic.bounce (AT) gmail (DOT) com> wrote:

Quote:
On Wed, 02 Jul 2008 09:07:43 +1000
dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote in:
doraymeRidThis-948361.09074302072008...ptusnet.com.au

In article
db4c1dd2-ef59-4900-ba33-208c373712ac...oglegroups.com>,
bay <bay_dar (AT) yahoo (DOT) com> wrote:

No, you can't perfect centre with css as I understand you want. You
can get awfully close but.

But there is a way with some extra:

http://tinyurl.com/2jcs5r

Cool, it worked, but I had to fix the Javascript for it to work in
IE for some reason. Worked in FF fine.


Feel free to give a URL so that your js could be traced by us all, it
might prove useful. I have clean forgot now if the mass of floats as
a whole centred properly in Internet Explorer, I think I would have
checked in IE6 at the time, but likely not in IE7? The javascript on
those pages at my URL is named in honour of its maker. And it was
fashioned probably with the details of my page in mind. So anything
you come up with that makes it more general would likely be helpful.


CSS version. I did not even try to make this work with older mozilla
type browsers. Not really the same but close, and no js.

http://tinyurl.com/637o7j
This is interesting. Nice in my Safari 2 but there is no wrapping at all
in FF 2.

--
dorayme


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

Default Re: How to center 1 to n floating div boxes on a page? - 07-02-2008 , 11:00 AM



On Wed, 02 Jul 2008 15:58:02 +1000
dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote in:
<doraymeRidThis-F64B4F.15580202072008 (AT) news-vip (DOT) optusnet.com.au>

Quote:
In article <20080702012129.773f3fe3 (AT) bootnic (DOT) motzarella.org>,
BootNic <bootnic.bounce (AT) gmail (DOT) com> wrote:

[snip]

CSS version. I did not even try to make this work with older mozilla
type browsers. Not really the same but close, and no js.

http://tinyurl.com/637o7j

This is interesting. Nice in my Safari 2 but there is no wrapping at
all in FF 2.

FF2 does not support inline-block, though FF3 does. It would also fail
in most other mozilla browsers.

What I have confirmed it works in:

IE 6
IE 7
Safari 3
FF 3
Opera 9.5
Galeon 2.0.5


--

BootNic Wed Jul 2, 2008 12:00 pm
Happiness for the average person may be said to flow largely from
common sense - adapting one-self to circumstances - and a sense of
humor.
*Beatrice Lillie (1898-1989) English comedienne*

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkhrphYACgkQylMUzZO6jeKuAgCfdOwodkEytJ +6thrvWfRrPABU
mKkAnR7vBcacE8/iLlNGrsK8H47ndfzX
=h2a0
-----END PGP SIGNATURE-----



Reply With Quote
  #8  
Old   
dorayme
 
Posts: n/a

Default Re: How to center 1 to n floating div boxes on a page? - 07-02-2008 , 08:22 PM



In article <20080702120014.2c33c658 (AT) bootnic (DOT) motzarella.org>,
BootNic <bootnic.bounce (AT) gmail (DOT) com> wrote:

Quote:
On Wed, 02 Jul 2008 15:58:02 +1000
dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote in:
doraymeRidThis-F64B4F.15580202072008...ptusnet.com.au

In article <20080702012129.773f3fe3 (AT) bootnic (DOT) motzarella.org>,
BootNic <bootnic.bounce (AT) gmail (DOT) com> wrote:

[snip]

CSS version. I did not even try to make this work with older mozilla
type browsers. Not really the same but close, and no js.

http://tinyurl.com/637o7j

This is interesting. Nice in my Safari 2 but there is no wrapping at
all in FF 2.


FF2 does not support inline-block, though FF3 does. It would also fail
in most other mozilla browsers.

What I have confirmed it works in:

IE 6
IE 7
Safari 3
FF 3
Opera 9.5
Galeon 2.0.5
Right, well that covers a lot of users.

(But, aside from this exercise, for a feature that is not essential,
namely centering a mass of floated thumbs, I am still happier with the
the original, employing some js and not inconveniencing anyone at all).

--
dorayme


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 - 2010, Jelsoft Enterprises Ltd.