Hi to all, I have the following problem, I have a div that includes a pictures and texts, if you put the following code in a html, and see the result, you can notice that in IE the text is displayed inside the DIV, in Firefox you can see the text is outside the DIV, this happens if the picture in the DIV is bigger(you can see attached picture)

<Div id="MyDiv" style="height:250px; width:375px;border:1px #048ab6 solid; background:#f7f7f7">  
<center>
    <br />
    <img src="Warning.png" />
	Title
    <br />
    <img src="pagerror.gif" />
    <br /><br /><br />
    text text text text text text text text text text text text text text text text
    <br /><br /><br />
</center>
</Div>

Why is mozilla browser is different? And How I can fix this?
Thanks in advanced

Recommended Answers

All 2 Replies

Try something like this:

<div style="width: 375px; max-width : 376px; height : 250px; max-height : 251px;"><div style="border : 1px solid #048ab6; overflow: hidden; background-color : #f7f7f7"><img src="Warning.png" style="border : none; margin : 0 auto 1em auto; display: block;" alt="test pic">
<img src="pagerror.png" style="border : none; margin : 0 auto 1em auto; display: block;" alt="test pic">
text text text text text text text text text text text text</div></div>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.