the other night i realized something amazing. i’ve been to the online world for ten years. i got my first modem at home when i was 16 and i’m turning 26 soon. TEN YEARS.. that’s a long time. a very significant part of a life. from 16 to 26, a person can change so much. so i started to remember everything that happened in this ten years. i became so emotional i couldn’t sleep. perhaps every generation has its own thing that’s bound to change people’s lives and the internet is the one for mine.
now please excuse my poor english. i can never express my emotions in english the way i do in chinese. therefore i notice when i get emotional, i speak in chinglish. Continue reading →
You may have run into this problem, you may have not. But I found an acceptable workaround to this particular problem.
Here’s the scenario.
So I have a two column layout where my navigation list (red) is floated to the left and my main content is on the right. In my main content I have another navigation list (gray) that floats to the left. And the text in my main content now wraps around. I really want my main content text below the gray navigation to still to the right of red navigation.
If I use a simply use a clear:left on the container around my content text, I will have it all the way below the red navigation list. This is expected behavior as clear:left means make sure there is no elements that are floated to the left of me. It however is not the ideal behavior I wanted.
In IE & Firefox (possibly other browsers) there is a *bug* that if you wrap the floating element in a fieldset, the fieldset acts as a container that stretches as far as the float elements.
This however really isn’t a good workaround because it uses a *bug* in both browsers and it DOES NOT work in browsers like safari. So I came up with a better solution today.
Float the ul element to the right with its width set to 100%, and then clear the container around the text to the right. This obviously only works if you don’t have anything above the text that’s also floated to the right.