Page 1 of 1

FLOAT, left and right. How would I float to centre (SOLVED)

Posted: Tue Sep 18, 2007 10:13 am
by JamesD
I have a couple of items that I am floating left and right, but I also want to put some items in between them. I take it there is no float centre, so how would I do this, use fixed or relative position or some other technique.

I just had a quick look at the wsc3 css guide and can't see how I would use any of the positioning tags, unless it is possible for me to set it as a percentage, ie: fixed 50%, not sure.

Thank you.

Re: FLOAT, left and right. How would I float to centre

Posted: Tue Sep 18, 2007 2:05 pm
by KO
You can float:both but i'm not sure it that is solution to your problem as I'm not sure what you trying to achieve.

br, K

Re: FLOAT, left and right. How would I float to centre

Posted: Tue Sep 18, 2007 2:44 pm
by SideshowBob
Hey KO,

How do you use float:both? ???

I thought only left,right,none or inherit were valid options. http://www.w3.org/TR/REC-CSS2/visuren.h ... t-position

Bob

Re: FLOAT, left and right. How would I float to centre

Posted: Tue Sep 18, 2007 3:00 pm
by KO
Sorry. No float:both. display:inline floats both and does bit more.

If you have items inside div text-align:center for that also works if those items are display:inline.

Re: FLOAT, left and right. How would I float to centre

Posted: Tue Sep 18, 2007 5:21 pm
by PlayGod

Re: FLOAT, left and right. How would I float to centre

Posted: Wed Sep 19, 2007 3:33 pm
by JamesD
thanks guys, problem solved. Learning so much stuff here it is nice to see something I actually already knew, even if I didn't realise it at first. Cheers.

Re: FLOAT, left and right. How would I float to centre

Posted: Wed Sep 19, 2007 3:38 pm
by alby
JamesD wrote: thanks guys, problem solved. Learning so much stuff here it is nice to see something I actually already knew, even if I didn't realise it at first. Cheers.
Please, add SOLVED in title topic (edit first topic)

Alby