Friday, July 28th 2006


CSS float, center and float bugs
posted @ 15:59 in [ Programming ]

The approach is to have the left and right nav bars floating while the center on the baseline. This approach makes sure that baseline is not lost till the bottom of the page. Both Firefox and Internet Explorer aparently are treating this apprach with their own ways.

We give width to the left and the right bar. Incase the width is given to the center as well, the behaviour starts. Firefox will render it from the left most pos regardless of the floating left. The patch is to give a margin-left. IE will render a strange 3 pixel left adn right padding which in spite of anything you do won’t go. There is not known solution to fix this.

The only way no to get into this trouble is never give a width to the center block. Everyone will be happy that way..

Cheers.


Leave a Reply

You must be logged in to post a comment.