Jump to content

IE label width


S@m

Recommended Posts

IE seems to cut off the width of any long label or text that I have on my form.Firefox will adjust and inherit to the width of the form (100%)Example:I have a really long string of text like this for a label or a span in my form.Firefox would display it all on 1 line.For some reason, IE would cut it off after "text" and wrap the rest on 2 lines.If I force IE and set the width of the container div to 100%, IE is fine. However I can't set that width because I have several inputs floated next to each other. (first name, last name) Setting 100% width causes my form to explode. :)I am looking for bugs, and found inline-block, but I'm not sure that is what I need.

Link to comment
Share on other sites

Sure my apologies. The app is sitting on an internal server so I am unable to post a link.HTML

<div id="application"><div class="frm_element">   <label for "myinput">This is a really long input title that goes way past the size of the input. IE will chop this off about 1/2 way through.</label>   <input type="text" id="myinput" size="5" maxwidth="5" title="something">   <p>Or, if I have a long string of text here, IE will wrap it on 2 lines even though there isn't a width restriction on it.</p></div></div>

CSS

#application {float:left;position:relative;clear:both;width:100%;margin-top:15px;border:1px solid #ccccb2;}.frm_element {float:left;clear:left;margin-top:10px;}label {cursor:pointer;display:block;padding-bottom:1px;}

Now, if I give the frm_element class a width of 100%, IE will keep everything on 1 line. The width of my form is 775px wide. I have the container (application) set to 100% width. No other widths have been set. Firefox will only wrap the text if it runs out of room (which is to be expected)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...