Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

min-width and max-width in firefox 1

Status
Not open for further replies.

dee2005

Programmer
Sep 11, 2005
29
GB
Hi

My problem I want to create a container that holds text and image, floated left

If a image is not visible I want the text to text fill the whole width;

Can some tell why when I set a min-width firefox ignores it

.ContentArticle span{
float:left;
position:relative;
width:auto;
max-width:auto;
min-width:354px;
padding-left:30px;
display:inline;
border:1px solid blue;
}

.ContentArticleImage{
float:right;
border:1px solid;
}


<div class="ContentArticleImage"><img src="../Images/hifi_room01.jpg" alt="" title="" /></div>
<div class="ContentArticle">
<span>gzsgasgdgdsgsgsgsgsgsdgsg</span>
</div>
 
Possibly because you have "display:inline"?

If you set a background-color on the floated div, do you see it stretch to the required width (i.e. manybe the span simply doesn't have enough content to fill the width of the div)?

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
my mistake there shouldn't a display:inline;

the content is

<div class="ContentArticle">
<span><strong>Kelvar&reg;</strong> is a synthetic aramud fibre, manufactured by <strong>DuPont</strong>, and probably best known for its in bulletproof vests. Indeed, those same mechnaical properties of strength and the ability to dissipate the energy of a bullet also have benefits for speaker cones. B &amp; W first started using <strong>Kelvar&reg;</strong> as a cone material in 1976, with the ntroduction of the DM6 speaker.</span>
</div>

so I am sure there is enough content
does firefox has issues with min-width
 
Rather than post bits of your code and say that certain bits shouldn't be in it, post your real code (i.e. the full HTML page) and you'll get real answers.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
I thought Kevlar was the material you're talking about. To do what you want, you should simply remove all the min-widths, max-widths and floats on your span, along with the span. Just use a normal paragraph -- if the floated image is there, it will float around it, if not, it will fill the whole area.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top