Forum Moderators: not2easy

Message Too Old, No Replies

DIVs flowing left when text grows

         

timhisu

4:31 pm on Jul 21, 2004 (gmt 0)

10+ Year Member



Hey everyone.

I'm workin on a new look for my website and I'm trying to emulate something they do with TD's in DIVs.

If you notice, as you increase the textsize, the INDEX at the top right flows to the left. My problem is that no matter what i try (relatively position, float right) it tries to flow right.. hits the end of the parent div.. and breaks to a new line.

[edited by: SuzyUK at 11:27 am (utc) on Oct. 26, 2004]
[edit reason] sorry no URLs : see TOS #13 [webmasterworld.com] [/edit]

Span

4:55 pm on Jul 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Basically, you should float the logo div left - don't forget a width - and float the index div right without a width. That way it expands to the left when users enlarge their font size.

Something like this:

#logo {
float:left;
width:220px;
}

#logo img {
margin:5px 0 0 15px;
}

#index {
float:right;
}

<div id="logo"><img src="images/isu.jpg" width="200" height="15" alt="" /></div>
<div id="index">
...
</div>

timhisu

6:03 pm on Jul 21, 2004 (gmt 0)

10+ Year Member



That worked great, thanks :)