View Full Version : Clear Property Line Spacing

05-10-2007, 05:17 AM
Hi All,
I'm having some trouble across browsers (IE vs. Firefox) with the Clear property and how many spaces my element comes down if I declare clear on one side. In Firefox it looks right to me, but in IE6 and IE7 the line height is way more than what I would like. Please look here for the example.

The issue revolves around the search box in the upper right area. Notice in Firefox it is very close to the top menu, which I like because I can top pad it if need be. However, in IE the box jumps quite a few pixels down and brings the logo down as well. If I delete the "clear: right" property from the search class then the box jumps to the left of the top menu which I obviously don't want. How can I fix so that IE's doesn't bring the search box down so many pixels after the clear is declared?

Any help would be greatly appreciated. Thanks in advance.


05-11-2007, 12:48 AM
Problem resolved. Apparently the issue wasn't so much the clear property at all. The issue was that IE gives all HTML form elements a certain height, whereas Firefox doesn't. So I simply put the following in my CSS to resolve the issue:

form {border: none;margin: 0;}

05-11-2007, 01:50 AM
Hello mamaia,
I alway put a little snippet in the CSS to zero out all default margins, padding and borders. Sometimes I add other things to that snippet that I want to reflect globally on the pages. Here is an example:

* {
margin: 0;
padding: 0;
border: none;
text-decoration: none;

When that little bit is added to your CSS you can specify your own measurements instead of having to deal with the different defaults from different browsers.