Is it possable with CSS to say I want <<An item>> to be so wide, and no narrower, however if it should need to it can expand as much as I want? Or better yet, can expand only a certain amount?
So a DIV would be 400px wide, by default however if 500px of text were inserted into it the DIV would expand it's boundries.
As far as I am aware there is a very simple way to set a minimum width, but this doesn't work with IE and I can't find a work around to get it to work. If you're still interested then the code is:
HTML
div{min-width:400px;}
As I said, this wont work with Internet Explorer and can play havok with site layouts and designs, so use at your own risk.
Here is a better link for the css dimensioning properties. I'll ask the mods to delete the specific links for min-width and max-width since this new link is more informative and should be more helpful to yourself and others. The specific information for min and max sizes are also available on the w3schools site. Use the site search box in the top right corner.
So, tweo things come out of this. The css for the element would become:
CODE
element {min-width: 50%; max-width: 80%}
and as reported by rvalkass below and on the chart at w3schools these properties are not supported by IE. Use it carefully.
IE treats width & height as min-width and min-height. Using child selectors which IE doesn't understand, you can feed it and other browsers different rules, e.g.:
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE
forum, Create your own topics, Ask Questions, track topics, setup
subscriptions & notifications and Get a Free Website w/ Email and FTP.