Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Text spilling out of the box in firefox
Old 07-03-2006, 07:56 AM Text spilling out of the box in firefox
Junior Talker

Posts: 3
Trades: 0
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; property of css but this brings scroll bar in firefox which i don't want.
Kindly, help as soon as possible.

Thanks,
sameer.
sameer2k is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-03-2006, 12:01 PM Re: Text spilling out of the box in firefox
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
As I replied in the other forum you post this same question to - put display: table-cell; on the .box and it will then expand like a table cell.

Why would you want to do this anyway ?
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 07-05-2006, 03:54 AM Re: Text spilling out of the box in firefox
Junior Talker

Posts: 3
Trades: 0
Thanks!!! web Mistress, display:table property is working under IE & FireFox. I have one more question, instead of background color & border, if I have one image of rectangle box, can i use this as background.

Please help, how can I make this image flexible to stretch in all browser & adjust according to the content size dynamically. I just wanted the text as it is within this panel, I mean the panel should strech vertically or horizontally, if text size increases.

div#content{margin-left:190px;margin-top:5px;}
div.box
{
width: auto;
min-width: 40px;
padding: 3px;
background: url(images/panel.gif) repeat-x;

white-space: nowrap

}
rest all my code is same.
Attached Images
File Type: gif panel.gif (14.6 KB, 7 views)

Last edited by sameer2k; 07-05-2006 at 04:00 AM..
sameer2k is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Text spilling out of the box in firefox
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.28939 seconds with 13 queries