473,473 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

bay

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
Jun 30 '08 #1
7 1940
In article
<3a**********************************@y38g2000hsy. googlegroups.com>,
bay <ba*****@yahoo.comwrote:
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
Jun 30 '08 #2
bay
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>

--
dorayme
Jul 1 '08 #3
In article
<db**********************************@m73g2000hsh. googlegroups.com>,
bay <ba*****@yahoo.comwrote:
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
Jul 1 '08 #4
On Wed, 02 Jul 2008 09:07:43 +1000
dorayme <do************@optusnet.com.auwrote in:
<do**********************************@news-vip.optusnet.com.au>
In article
<db**********************************@m73g2000hsh. googlegroups.com>,
bay <ba*****@yahoo.comwrote:
>>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-----

Jul 2 '08 #5
In article <20*********************@bootnic.motzarella.org> ,
BootNic <bo************@gmail.comwrote:
On Wed, 02 Jul 2008 09:07:43 +1000
dorayme <do************@optusnet.com.auwrote in:
<do**********************************@news-vip.optusnet.com.au>
In article
<db**********************************@m73g2000hsh. googlegroups.com>,
bay <ba*****@yahoo.comwrote:
>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
Jul 2 '08 #6
On Wed, 02 Jul 2008 15:58:02 +1000
dorayme <do************@optusnet.com.auwrote in:
<do**********************************@news-vip.optusnet.com.au>
In article <20*********************@bootnic.motzarella.org> ,
BootNic <bo************@gmail.comwrote:
[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-----

Jul 2 '08 #7
In article <20*********************@bootnic.motzarella.org> ,
BootNic <bo************@gmail.comwrote:
On Wed, 02 Jul 2008 15:58:02 +1000
dorayme <do************@optusnet.com.auwrote in:
<do**********************************@news-vip.optusnet.com.au>
In article <20*********************@bootnic.motzarella.org> ,
BootNic <bo************@gmail.comwrote:
[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
Jul 3 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Freek te Water | last post by:
Hi, Hope no-one is offended by my probably noob question... Context: I have a web page design, which always centres in the middle of the screen (using a 100%*100% HTML-table). Now I also use...
2
by: OliFilth | last post by:
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...
8
by: | last post by:
How do you center, like I am trying to do, below the group of images? Why does it not work? Example: <div><h2>The Title</h2><img src="images/BigPicture.jpg" height="150px" width="250px"></div>...
4
by: Simon Wigzell | last post by:
I have used this piece of freeware in my webpage to give me a floating DIV: http://www.developer.be/index.cfm/fuseaction/faqDetail/FaqId/308.htm It works great except for one odd thing -...
6
by: Usenet | last post by:
I might be being silly here. On my links page I've got a whole load of floating boxes, which I'm really pleased with. But then I want the footer to be *below* them. On my current site...
4
by: Ivor Somerset | last post by:
Dear CSS community, The code below shows my problem. I have a containing DIV box into which I place floating boxes. As the background-color shows, the size of the containing box is not extended...
1
by: pradeepindia | last post by:
Hi folks, I have a web page where I uses links to open div boxes( floating). Again from that Div boxes I am opening another div box. The issue here is the child div always goes behind the main...
2
by: David | last post by:
I'm trying to style a kind of minimalist welcome page where each of X number of (gray?) boxes will be links to a part of the site. I want to implement the navbar (ie, set of boxes linking to...
5
by: Adam Smith | last post by:
Hello, Several of the newer, more professional web sites are using a newspaper columnar layout, with text and links discretely contained in rectangular boxes (square or rounded), frequently with...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.