cyber0ne Posted October 21, 2005 Share Posted October 21, 2005 Suppose I have two DIVs, one floated to the left and one not floated. The text of the non-floated one will wrap around the floated one just fine. However, as the text in the floated one increases, it pushes further and further right on the page.Is there a way to set the floated DIV's text to always wrap, such that it will never be wider than the largest word it contains?This is for a set of left-column navigational links where it should be as narrow as possible. I'm reluctant to set any kind of pre-defined width or max-width as you never know what the name of a link will be in there and I wouldn't want it to spill out of the DIV.Page in question: http://www.cyber0ne.com/test/cssAny ideas?-cyber0nehttp://www.cyber0ne.com Link to comment Share on other sites More sharing options...
actionsketch Posted October 23, 2005 Share Posted October 23, 2005 well... why don't you simply add a <br> instead of a space in your navigation? Link to comment Share on other sites More sharing options...
F-Man Posted October 23, 2005 Share Posted October 23, 2005 What about min-width? Link to comment Share on other sites More sharing options...
actionsketch Posted October 23, 2005 Share Posted October 23, 2005 What about min-width?<{POST_SNAPBACK}> IE doesnt support it, and I'm almost positive it won't force word wrapping like that. Link to comment Share on other sites More sharing options...
cyber0ne Posted October 24, 2005 Author Share Posted October 24, 2005 well... why don't you simply add a <br> instead of a space in your navigation?<{POST_SNAPBACK}> I'm hoping to avoid <br> as much as possible in my designs, since it'll be more of a roadblock should I want to change my website's layout by simply swapping out the stylesheets.Also, much of my nav column will be dynamically generated, so for any given page throughout the site (and there are many) there could be all kinds of different links in there. If there's one called "Miscellaneous" then I wouldn't want one called "About Me" to wrap, since there's plenty of room for it on one line with the former link stretching the DIV out.-cyber0nehttp://www.cyber0ne.com Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now