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

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
JamesD
Forum Members
Forum Members
Posts: 25
Joined: Tue Aug 21, 2007 1:28 pm

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

Post 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.
Last edited by JamesD on Wed Sep 19, 2007 3:42 pm, edited 1 time in total.
KO
Power Poster
Power Poster
Posts: 562
Joined: Mon Nov 06, 2006 7:55 pm

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

Post 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
SideshowBob
Forum Members
Forum Members
Posts: 80
Joined: Thu Sep 13, 2007 10:50 am

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

Post 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
KO
Power Poster
Power Poster
Posts: 562
Joined: Mon Nov 06, 2006 7:55 pm

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

Post 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.
JamesD
Forum Members
Forum Members
Posts: 25
Joined: Tue Aug 21, 2007 1:28 pm

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

Post 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.
alby

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

Post 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
Post Reply

Return to “Layout and Design (CSS & HTML)”