Re: jQuery / CSS / HTML Stacking Order
Quote:
Originally Posted by
EliteGM
Ah well tbh I'm not even sure what made my thing work. For clearing, I used "overflow: hidden;" on .mainFastOptionContainer so I didn't have to add any extra clear:both; divs.
Oh I did not know hiding the overflow will cause the same effect (and even in js runtime). Pretty neat, as long as all browsers understand this ...
After some research both of our ideas are not the best way to go or are just dirty ...
css - Which method of 'clearfix' is best? - Stack Overflow
I think Micro's clearfix is the best way to go here, it does not?
Quote:
Originally Posted by
EliteGM
The truth is: the code was a mess. The CSS was probably twice as long as it should be: all the different classes for the same things were just too much. As a result, the jQuery bit was also too long. As I said, I generalized everything: a single class for every option and the only changing bit being the red/green/blue gradient.
Well, that is the way to do it right, I approve. ^^
Re: jQuery / CSS / HTML Stacking Order
I just said above that overflow:hidden; and zoom:1; auto clears divs in almost every browser. It causes errors too sometimes , but there is also
PHP Code:
.clear:after {
content: "";
display: table;
clear: both;
}
As suggested on the interwebs. Than you just add class "clear" to any container. It only works on modern browsers , I.e. : Internet Explorer 9 and up , Chrome , Firefox , Opera , and probably Safari
I also specified that his code was a mess , I have also cleaned it , what I didn't do is to add another wrapper , and clear that instead of his wrapper.