RoxyBoo
01-13-2009, 03:02 AM
Ok, so using float is better than tables.
But how do you use them?
I define each big div width as a percentage so it will fit the same in all resolutions.
All divs contained in the big div have a given pixel width. I could probably define them as percentages too but then what would be the merit of float?
So, when the resolution changes more small divs fit on one line of the big div.
That's fine, but the space left on the right (if I float left) looks terrible.
I'm thinking now that maybe the big div should have width:auto? But then when would it know where to stop?
I think I am missing something here, could somebody please tell me what it is?
I have had this problem for a long time in css, I am sure anybody with a good knowledge of css knows what I am talking about, I don't think my question needs a script.
I am talking about the case when there is too little space left on the right to fit a new div with float but everything now looks off center.
When either the big div should be able to be a little flexible and let a new div in by itself or
or all the existing small divs should get centered. It is analogous to using justified text vs unjustified text. Except my small divs are all equal (while the words in texts are not)
But how do you use them?
I define each big div width as a percentage so it will fit the same in all resolutions.
All divs contained in the big div have a given pixel width. I could probably define them as percentages too but then what would be the merit of float?
So, when the resolution changes more small divs fit on one line of the big div.
That's fine, but the space left on the right (if I float left) looks terrible.
I'm thinking now that maybe the big div should have width:auto? But then when would it know where to stop?
I think I am missing something here, could somebody please tell me what it is?
I have had this problem for a long time in css, I am sure anybody with a good knowledge of css knows what I am talking about, I don't think my question needs a script.
I am talking about the case when there is too little space left on the right to fit a new div with float but everything now looks off center.
When either the big div should be able to be a little flexible and let a new div in by itself or
or all the existing small divs should get centered. It is analogous to using justified text vs unjustified text. Except my small divs are all equal (while the words in texts are not)