Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

Thread: 

How to show 2 divs inline?

Ads
banner
banner
banner
ladiesman217 Offline referral

Posts: 93
Joined: Jun 2014
Reputation: 0

#1
Member
I have two divs and I you like them to show one next to other horizontally I mean one on the left and the other on the right?
surenot Offline referral

Posts: 500
Joined: Jan 2014
Reputation: 16

#2
Senior Member
Wrap them in a div then use CSS float property.

HTML:
Code:
<div>
<div class="left">some content</div>
<div class="right">some content</div>
</div>

CSS:
Code:
.left {
float: left;
}
.right {
float: right;
}
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#3
Support Team
Better to use CSS inline-block property.

Code:
<div class"wrapper">
<div>1</div>
<div>2</div>
</div>
Code:
.wrapper div {
display: inline-block;
vertical-align: middle;
}
ladiesman217 Offline referral

Posts: 93
Joined: Jun 2014
Reputation: 0

#4
Member
Thanks Marcus your solution works better +1





User(s) browsing this thread: 1 Guest(s)