.little_boy_family{ position:relative; margin:10px; margin-bottom:30px; } .little_boy_house{ position:absolute; margin:5px; z-index:100; /* width:100%;*/ } .little_boy, .little_boy_house input{ display:inline-block; position:absolute; margin:0; padding: 0; text-align:center; font-size:20px; } .LB-axises{ position:relative; z-index:10; } .LB-x-axise ,.LB-y-axise{ position:static; } .LB-x-axise{ } .LB-y-axise{ } .LB-x-axise label,.LB-y-axise label{ text-align:center; margin:0; padding:0; display:inline-block; /*fix firefox position relative bug*/ }