PDA

View Full Version : حالت نمایش افقی در css



arsalansalar
دوشنبه 26 مرداد 1394, 11:19 صبح
با سلام
من یک کد css به شرح زیر دارم:
#newadstitle{/* margin: 2px 2px 15px 2px; */
margin: 2px;
height:30px
}
#newadsimage {
margin-right: 5px;

}


#newadsbox {
background: none repeat scroll 0% 0% rgb(255, 255, 255) !important;
position: relative !important;
border: 1px solid rgb(204, 204, 204) !important;
box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.15) !important;
border-radius: 5px 5px 5px 5px !important;
height: auto !important;
width: 150px !important;
padding: 5px !important;
margin-top:1px;
.horizontal-separator {
height: 0;
}
.newintrob {
background: none repeat scroll 0% 0% rgb(255, 255, 255);
padding: 3px;
border: 1px solid rgb(221, 221, 221) !important;
border-radius: 5px 5px 5px 5px;
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.055);
transition: all 0.2s ease-in-out 0s;
width: 60px;
height: 60px;
}
.newintrob:hover{background:#0B6AA9;}
.newvipbadge{
position:absolute;
top:-2px;
left:-2px;
background:url(../images/new.png) no-repeat center;
height:48px;
width:48px;
}


و حالتی که برای من نمایش می دهد به شکل زیر است:
134363

برای اینکه حالت نمایش و به صورت افقی در بیارم چه تغییر باید در کد بدهم؟

somaye-s
دوشنبه 26 مرداد 1394, 12:56 عصر
از float:right استفاده کنید.

sinoser
دوشنبه 26 مرداد 1394, 13:41 عصر
از float:right استفاده کنید.
البته می تونید از display : inline-block هم استفاده کنید. این روش بهتر از float است.