मेरे पास यह HTML है:मैं अपनी सामग्री को फिट करने के लिए एक डीआईवी फैलाव कैसे सुनिश्चित कर सकता हूं?
<div
class="currentDesignDiv"
style="margin-bottom:5px;">
<div>
<img
alt="Thumbnail"
src="http://www.propertyware.com/templates/
<bean:write name="currentTemplate" property="primaryKey"/>
/thumb.gif"/>
</div>
<div>
<table>
<tr>
<th>Your Current Design: </th>
<td>Template #:
<bean:write name="currentTemplate" property="primaryKey"/>
</td>
</tr>
<tr>
<th>Last Updated: </th>
<td>
<bean:write name="currentTemplate" property="modifiedByAsString"/>
</td>
</tr>
<tr>
<th>Total Pages: </th>
<td>
<bean:write name="numberOfPages"/>
</td>
</tr>
</table>
</div>
इस सीएसएस द्वारा स्टाइल किया जा रहा है:
.currentDesignDiv{
background-color:#e7e7e7;
border:1px solid #9c9c9c;
padding:5px;
width:100%;
min-width:860px;
}
.currentDesignDiv div{
float:left;
width:33%;
}
.currentDesignDiv div table{
font-size:9pt;
text-align:left;
margin:17px;
}
.currentDesignDiv div:first-child img{
margin:17px;
width:80px;
}
यह मेरे बड़े मॉनिटर पर ठीक दिखता है, लेकिन जब मैं अपने छोटे मॉनिटर में बदल जाता हूं तो सही-div
, जिसमें इसके अंदर एक छवि है, पैरेंट div
के बाहर तैरती है। क्या किसी के पास इसका समाधान है?
कृपया अगली बार अपने कोड स्निपेट को स्वरूपित करने में कुछ प्रयास करने का प्रयास करें। आपके द्वारा छोड़े गए सभी व्हाइटस्पेस के कारण किसी को भी स्क्रॉल करना पसंद नहीं है। – Welbog
@Welbog: इसके लिए +1 .. – MarioRicalde
@hdx: क्या आप कृपया मुझे वह छवि दे सकते हैं जिसका आप उपयोग करने का प्रयास कर रहे हैं? चूंकि "<बीन: लिखने का नाम =" वर्तमान टेम्पलेट "संपत्ति =" प्राथमिककी "/>" गड़बड़ कर रहा है। – MarioRicalde