2009-12-28 15 views
14

करने के लिए एक निचली सीमा जोड़े मैं एक divएक div

.divLast 
{ 
    top: 0px; 
    margin:0px; 
    padding: 0px 2px 2px 3px;  
    border-width: 2px; 
    border-bottom-width:2px; 
    border-bottom-color:White; 
    width: 100%; 
} 

हालांकि निचली सीमा सफेद प्रकट नहीं होता है करने के लिए एक निचली सीमा को जोड़ने के लिए कोशिश कर रहा हूँ। कोई उपाय?

उत्तर

38

आप div

को भी border-bottom-style निर्दिष्ट करने के लिए है और आप अपने कोड

.divLast 
{ 
    top: 0px; 
    margin:0px; 
    padding: 0px 2px 2px 3px;  
    border-width: 2px; 
    border-bottom-width:2px; 
    border-bottom-color:White; 
    border-bottom-style: solid; 
    width: 100%; 
} 

हो जाता है या आप की तरह

नीचे
<style> 
.divLast 
{ 
    top: 0px; 
    margin:0px; 
    padding: 0px 2px 2px 3px;  
    border-width: 2px; 
    border-bottom: 2px white solid; 
    width: 100%; 
} 
</style> 
<div class='divLast'> 
    test element with white border bottom 
</div> 

यह ठीक काम करता है border-bottom के लिए एक आशुलिपि का उपयोग कर सकते मेरे लिए

+0

सबसे अच्छा सलाह के लिए धन्यवाद – ScG

7

ऐसा इसलिए है क्योंकि आपको टी की आवश्यकता है ओ बताएं कि सीमा शैली क्या है। इस सीमा अभ्यस्त शो के बिना:

border-bottom-style:solid; 

तुम भी तो की तरह एक में अपने declerations जोड़ सकता:

border-bottom:2px solid White;