div "float" vs. img "align"

liunx

Guest
When using the "align" attribute of img's, it will shift to that part of the screen, and the text moves freely about as if there was just a fence around the image..
I tried converting to DIVs to keep validation, but I saw that when using "float," text will stop where the <div> tag was inserted and then continue on the next line..

I was wondering if there's a way to keep the text moving, regardless of where a div is inserted? I have a large page of text with images randomly place in the text--if it's to be viewed on different resolutions, etc., I wanted to keep the text flowing instead of stopping mid-sentence to jump to the next line...

Here's an example page (<!-- m --><a class="postlink" href="http://www.juparis.x3fusion.com/other/hslt.htm">http://www.juparis.x3fusion.com/other/hslt.htm</a><!-- m -->) of the problem.. (It's just random text for now).

I was also wondering how to keep two divs centered, but kept next to eachother as well; using display:inline resized the border, and using float's shift them onto seperate lines... Help!You have quite a number of errors, such as missing end divs and mis-types in your css code, such as img.rp positioning."I was also wondering how to keep two divs centered, but kept next to eachother as well; using display:inline resized the border, and using float's shift them onto seperate lines... Help!"

Put them inside another div, center that div, and float them both left.

You do not need to wrap images in DIV tags to align them left or right, simply add a class to the image itself and float IT left or right.

You might also be interested in <!-- w --><a class="postlink" href="http://www.lipsum.com">www.lipsum.com</a><!-- w --> for your random test text.You have quite a number of errors, such as missing end divs and mis-types in your css code, such as img.rp positioning.

I must have rushed too much when making the page--I fixed the positioning, but saw no missing div tags...



Put them inside another div, center that div, and float them both left.

You do not need to wrap images in DIV tags to align them left or right, simply add a class to the image itself and float IT left or right.

The first part has me confused now... I added a div tag, saved, went back and removed that div tag without touching anything else. Suddenly, they're adjacent the way I want, but the div they're in won't center anymore..

And I prefer to keep the images in divs--I like the border effect now, and would much rather keep the divs than to just re-create each image with a fake border around it.


You might also be interested in <!-- w --><a class="postlink" href="http://www.lipsum.com">www.lipsum.com</a><!-- w --> for your random test text.
I never knew random text had it's own site, let alone a popular purpose.. Thanks for the link--you saved me a lot of typing. :D

If you look at the test page again (which is virtually the same as it was before), you'll notice that the third image down is exactly how I want it--in ever resolution, in every window size, the text moves about freely without breaking.. I don't understand what sets it apart though.. Can anyone else find it?
 
Back
Top