Using floatright and floatleft

Started by Inari, September 17, 2012, 03:02:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Inari

I am revamping my ons and offs thread and wanted to do something with it that isn't quite working.

I want to put an image one side and then have text next to it. I want to have it keep switching sides so it's left for ons, right for offs and left again for maybes. However when I tried the code it keeps messing up. (Keeps jumbling together or going pushing the writing too far away.) I am not sure where I am going wrong, but I am hoping someone can help me please.

Lilias

To go in the dark with a light is to know the light.
To know the dark, go dark. Go without sight,
and find that the dark, too, blooms and sings,
and is traveled by dark feet and dark wings.
~Wendell Berry

Double Os <> Double As (updated Mar 30) <> The Hoard <> 50 Tales 2024 <> The Lab <> ELLUIKI

Kye

After looking over the tutorial if you have any specific questions or need help figuring it out feel free to send me a PM.  I'd be happy to go over the code with you.


Geraint

As someone who alternates right and left floats a lot, I have a pretty good idea what your problem may be, and it's not covered in the tutorial.

Unless you consistently have enough text to surround the floated item, the floats will start floating around each other, which is what causes the effects you describe. 

The solution is simple.  When you are finished with the text for a float, you should end it with this tag.

[clearboth]

That will allow the next float (be it right or left) to start fresh, right after the bottom of the text or the bottom of the picture, whichever is lower,  rather than within the previous float.

Oreo

That's a great tip, Geraint. I'll have to give it a try. It sounds much easier than putting it all in tables.

She led me to safety in a forest of green, and showed my stale eyes some sights never seen.
She spins magic and moonlight in her meadows and streams, and seeks deep inside me,
and touches my dreams. - Harry Chapin

Geraint

#6
Quote from: Oreo on September 17, 2012, 07:21:40 PM
That's a great tip, Geraint. I'll have to give it a try. It sounds much easier than putting it all in tables.

You're welcome, milady.  I use it in my O/Os thread a lot, and occasional in play, though it only works easily for two columns, if used for that.   

And it was actually one of the first tidbits I picked up here in this forum.

See here and then posts 1 and 3 here

Oreo

I have to laugh at myself since I clearly only remembered the [ you] tag.

She led me to safety in a forest of green, and showed my stale eyes some sights never seen.
She spins magic and moonlight in her meadows and streams, and seeks deep inside me,
and touches my dreams. - Harry Chapin

Kye

Quote from: Oreo on September 18, 2012, 11:40:58 AM
I have to laugh at myself since I clearly only remembered the [ you] tag.

It's not just you. I somehow completely missed the clear tags. >.>