css - IE6 renders spacing even when margin and padding are zero -
i've created contrived example illustrate problem. there 2 paragraphs div in between. div's height , line-height have been set 0 , margins 0. expect 2 paragraphs right next each other without spacing div @ all, not case in ie6. seems work fine in other browsers.
here html styles inlined:
<!doctype html> <html lang='en'> <head> <title>test</title> </head> <body> <div id="container" style="border: 1px solid blue;"> <p style="margin: 0;"> text </p> <div style="height: 0; line-height: 0; margin: 0; border: 1px solid red;"> </div> <p style="margin: 0; border: 1px solid green"> should right below "some text" </p> </div> </body> </html>
i've added in few borders can more see what's going on.
here's screenshot of what's happening in ie6:
any ideas on how can rid of little space between bottom of div (red) , top of paragraph (green)?
add font-size:0;
div. should remove space
Comments
Post a Comment