When you remove a floated element from the flow of a document its position is occupied by the next float and this causes the ruin! To preserve the space leaving by a removed div how about use: css('visibility', 'hidden'); istead of show()
MaurĂcio -----Mensagem Original----- De: simusch Para: jQuery (English) Enviada em: quinta-feira, 20 de agosto de 2009 16:56 Assunto: [jQuery] hide divs with float:left and show them again Hi I have a site with a lot of small div-boxes (with images and movies within them) they are positioned with CSS and float:left. i created buttons, which show and hide either all images or all movies this works well. but when i switch between these options, the float-position of the divs goes crazy and every div-container is on one line for itself (instead of 5 on one line) does someone have an idea, how i can solve this problem? simon