This is a discussion on "Text spilling out of the box in firefox" within the Web Page Design section. This forum, and the thread "Text spilling out of the box in firefox are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Text spilling out of the box in firefox
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Text spilling out of the box in firefox
Hi,
Please, help me how can I have flexible box with background color in css that will expand according to the contents. Following is the test code that I have used, it is working in IE but in firefox contents come out of the box. I am looking for the cross browser fix for this:- The CSS File I am using contains the following:- div#content{margin-left:190px;margin-top:5px;} div.box { width: auto; min-width: 40px; border: 2px solid #781351; padding: 3px; background: #d7b9c9; white-space: nowrap } following is my html file:- <html> <head> <link href="test.css" rel="stylesheet" type="text/css" media="all" /> <title>TEST PAGE</title> </head> <body> <div id="content"> <div class="box"> <H1>Sam</H1> <H1>Sam</H1><H1>Sam</H1><H1>Sam</H1><H1>Sam</H1> <p>The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology The technology </p> </div> </div> </body> </html> I know one fix is overflow:auto; property of css but this brings scroll bar in firefox which i don't want. Kindly, help as soon as possible. Thanks, sameer. |
|
#2
|
|||
|
|||
|
Re: Text spilling out of the box in firefox
remove: "white-space: nowrap"
that works.. |
![]() |
| Tags |
| text, spilling, box, firefox |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| making text field text disapear | Phixon | JavaScript Forum | 4 | Feb 2nd, 2008 08:49 |
| [SOLVED] Image with text -> text with background | alexgeek | Web Page Design | 5 | Nov 14th, 2007 00:25 |
| Text appears larger in Safari than in Firefox | pawpour | Web Page Design | 2 | Aug 15th, 2007 15:13 |
| alt text/title text differences | Donny Bahama | Web Page Design | 3 | Apr 23rd, 2007 18:02 |
| container overlaps upon text resize in Firefox | eksquall | Web Page Design | 4 | Aug 1st, 2006 17:26 |