Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-17-2012, 03:14 PM   PM User | #1
samslystone
New Coder

 
Join Date: Dec 2011
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
samslystone is an unknown quantity at this point
jquery fluid layout - avoiding float drop

Hi all

Still having a little problem with this one. I have a fluid layout on this site:

http://catherinehyland.co.uk/2012/work/work.html

When the browser is resized a little problem occurs with the menu at the top: the menu items drop down beneath the website name. What I would like to do is keep the menu fluid down to a certain width (say 500px) but then to keep it at that width. I have been told that I could use JS to do this and to prevent the float drop. Can anyone help me with some script?

All the best

S
samslystone is offline   Reply With Quote
Old 12-17-2012, 04:29 PM   PM User | #2
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,827
Thanks: 9
Thanked 685 Times in 679 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
I think a bit of css will do this for you.
Try setting min-width:500px on both #menu and #cf7.
SB65 is offline   Reply With Quote
Old 12-17-2012, 04:57 PM   PM User | #3
samslystone
New Coder

 
Join Date: Dec 2011
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
samslystone is an unknown quantity at this point
Thank you! That almost works, but the smaller menu items are still slipping under the name (Catherine Hyland).
samslystone is offline   Reply With Quote
Old 12-17-2012, 05:52 PM   PM User | #4
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,827
Thanks: 9
Thanked 685 Times in 679 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
Well, yes, but that's because there is insufficient room to fit your current layout into 500px.

A min-width of 640px will prevent the menu going under the name (although to be honest I don't see this as a big issue). You can probably get away with a smaller min-width by reducing the padding on your menu items.

You might also want to look into using @media queries to make your layout responsive - this would allow you (for example) to space your menu items less on a smaller screen.
SB65 is offline   Reply With Quote
Old 12-17-2012, 06:33 PM   PM User | #5
samslystone
New Coder

 
Join Date: Dec 2011
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
samslystone is an unknown quantity at this point
Thank you

Thank you so much! That has been a great help! It works perfectly now.

All the best

Samuel
samslystone is offline   Reply With Quote
Reply

Bookmarks

Tags
float drop, jquery

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 03:16 AM.


Advertisement
Log in to turn off these ads.