Odd float/menu combination

This is a discussion on "Odd float/menu combination" within the Web Page Design section. This forum, and the thread "Odd float/menu combination are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jul 2nd, 2007, 16:43
Junior Member
Join Date: Jul 2007
Location: UK
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Odd float/menu combination

Hi guys,
I'm trying to get some very specific float behaviour and I'm not sure if it can be done or not, or if it's blatantly obvious.
Basically, at the top of the page I want a small image (logo) floated to the right, and a horizontal menu (although for these purposes, just, say, some text) on the left. The menu/text is short enough that, in a normal browser window, it has no need to wrap. However, I'm a stickler, so what I want to happen if the window is narrowed is this: first the text jumps down a line (because it doesn't fit next to the image); then when (and only when) the browser window itself gets too narrow for the text, the text starts wrapping.
I've tried just floating the image to the right, and the text wraps as soon as it gets too wide for [broswer window width - image width]. I've tried fixing the text width, but then it doesn't wrap at all. It's like I'm looking for a "soft" break condition (when the image is trying to squash the text) and a "hard" break condition (when it's the window itself doing the squashing) and I'm not sure such a thing exists.

Unless it's something obvious!

So yeah, thanks if anyone can help me, and sorry if this is a dumb question!
Reply With Quote

  #2 (permalink)  
Old Jul 2nd, 2007, 18:32
Up'n'Coming Member
Join Date: Jun 2007
Location: Birmingham, UK
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Odd float/menu combination

I might be wrong, but I don't think it can't be done with CSS alone. The problem is that you would need to specify the width of the menu/text element depending on where it is displayed.

I can think of a way to do this with JavaScript, but that is probably not what you want.
Reply With Quote
  #3 (permalink)  
Old Jul 2nd, 2007, 21:25
Junior Member
Join Date: Jul 2007
Location: UK
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Odd float/menu combination

Yeah, thanks for the offer, but I'm trying to keep things simple. Trying to replicate a site done in *cough* tables, and one thing I noted was how horrible this navbar looked if the page wasn't wide enough. I'll keep trying tomorrow, but any moe replies are welcome!
Reply With Quote
  #4 (permalink)  
Old Jul 3rd, 2007, 07:42
Up'n'Coming Member
Join Date: Jun 2007
Location: Germany
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Odd float/menu combination

a link or at least a screenshot would probably help!
Reply With Quote
Reply

Tags
css float menu

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Css Float??? RZX Developer Web Page Design 4 Aug 13th, 2007 10:37
CSS Float Issue Ryan Fait Web Page Design 5 Jan 16th, 2007 14:59
Problems with float:left float:right nvidiajoe Web Page Design 8 Nov 17th, 2006 20:24
float question... asa_carter Web Page Design 4 Aug 27th, 2006 00:18
IE6 Float masonbarge Web Page Design 8 Aug 16th, 2006 10:13


All times are GMT. The time now is 21:15.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43