have issue in content when i write something in a div its goes out of tag

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • naman750
    New Member
    • Jul 2014
    • 2

    have issue in content when i write something in a div its goes out of tag

    i have a issue when i write something on a div its look nice ...but when i did ctrl + ctrl - its goes out

    HTML:

    Code:
    <div class="nav_last">
    <div class="first_box">
         <div class="img_box"><img src="http://www.w3schools.com/images/pulpit.jpg" alt="ssd"></div>
             <div class="text_box"><p>jo bhi main o ye kehna cahu o ye barbaad kare alfaaz mere alfaaz mere o ye ye ye yeye </p>
             <p>jo bhi main o ye kehna cahu o ye barbaad kare alfaaz mere alfaaz mere o ye ye ye yeye </p>
             </div>
        </div>
    
    
    CSS:
    
    .nav_last{
    
    
    width:100%;
    height:400px;
    background-color: #e8ac31;  
    margin-top:20px;  
    text-align:center; 
    }
    
    
    .first_box {
    
    width:241px;
    height:auto;
    background-color: rgba(0,0,0,0.4); 
    display:inline-block; 
    margin-top:20px;
    margin-left:10px;   
    
    }
    
    .img_box {
    
    width: 241px;
    height:180px;
    margin-top:20px; 
     
    
    }
    
    .first_box > .img_box > img {
    
    width:120px;
    height:120px;  
    border-radius:50%; 
    
    }
    
    .text_box {
    
    width:241px;
    height:170px;
    font-size:11px;
    line-height:2;  
    font-family:Verdana; 
    
    }
    
    .text_box > p {
    
    height: auto;
     color:#fff;
    
    }
    Last edited by Rabbit; Aug 14 '14, 03:52 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
  • Exequiel
    Contributor
    • Jul 2012
    • 288

    #2
    Try to change your .nav_last, .first_box and .text_box with this codes.

    Code:
    .nav_last{
    	width:100%;
    	height:auto;
    	background-color: #e8ac31;  
    	margin-top:20px;  
    	text-align:center;
    	padding-top:20px;
    	padding-bottom:20px;
    }
    
    .first_box {
    	width:241px;
    	height:auto;
    	background-color: rgba(0,0,0,0.4); 
    	display:inline-block; 
    	margin:auto 0px; 
    	padding:3px;
    }
    
    .text_box {
    	width:241px;
    	height:auto;
    	font-size:11px;
    	line-height:2;  
    	font-family:Verdana; 
    }

    Comment

    Working...