2

Display table cell margin not working..try to add margin in percentage but not working. Here is my html code

<div class="mainbody clearfix">
<div class="leftpart">&nbsp;</div>
<div class="rightpart">&nbsp;</div>
<br>
<br>
.
.
.
<br>
<div class="cl"></div>
</div>

Here is my CSS code

.mainbody{
width:100%; 
display:table; 
margin:12px 0px 0px 0px;
}

.leftpart{
width:23%; 
display:table-cell;  
background-color:#ededed; 
border-right:solid 1px #a7a7a7; 
margin-right:2%; 
}

.rightpart{ 
width:75%; 
display:table-cell; 
background-color:#ccc;   
}

please help me

Ravi Gadhiya
  • 390
  • 3
  • 15

1 Answers1

0

Using float:left to the class would apply margin to the Div. But not sure if this solves your problem.

Pbk1303
  • 3,702
  • 2
  • 32
  • 47
Kishori
  • 1,065
  • 6
  • 12