Forum Moderators: not2easy

Message Too Old, No Replies

floating left column with no column

float column

         

boheme

1:47 pm on Nov 22, 2007 (gmt 0)

10+ Year Member



Hi all. I've been developing websites for 5 years, and I think I've got a really good xhtml/css level - but there is a problem I can't resolve, and I think it cannot be resolved.

I have the following html code (I'll write only the interesting part):


<div class="container">
<div class="div1">
<img src="whatever.gif" alt="whatever" />
</div>
<h3>heading3</h3>
<p>paragraph really long paragraph really long paragraph really long paragraph really long paragraph really long paragraph really long paragraph really long</p>
<ul>
<li>first</li>
<li>second</li>
</ul>
<p>second paragraph</p>
</div>

mportant: the image shown has no fixed width, and I cannot change the html code, because it's generated by drupal, a CMS.

How the hell can I get this?

Thanks!

[edited by: jatar_k at 8:07 pm (utc) on Nov. 23, 2007]
[edit reason] no urls thanks [/edit]

SuzyUK

7:59 pm on Nov 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld boheme..

what are you tring to do? center the image as a heading? shrink to fit? float left/right with text wrap?..

forgive me but I've read your post several times and can't think what you want the image to do..

boheme

12:30 pm on Nov 25, 2007 (gmt 0)

10+ Year Member



Hi SuzyUK, I want to create a two column layout, first column will be div1, containing a single image (which has no fixed width) and the second column will contain everithing else (i mean, h3, p and so on)

Thanks!

[edited by: encyclo at 12:40 pm (utc) on Nov. 25, 2007]

HarryM

4:18 pm on Nov 25, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ideally you need to put the "h3, p and so on" stuff in a separate div, but that's impossible if you can't alter the html.

One way would be to float div1 left and give it a fixed height which is greater than anything else on the page. The result should look like a two-column layout, but it's pretty crude.

boheme

8:32 am on Nov 26, 2007 (gmt 0)

10+ Year Member



Hi harry!

I think I'll have to change html however, because I've tried so many hacks but no one worked for every browser.

Thanks all!