Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Owa Aquino
19,277 PointsHelp : Needed to display a set of element in-line together instead of stacking above each other.
Hello mates!
Just need some help on my project. I needed a group of element to be next each other like a column or some thing like this:
set of element set of element set of element
but so far what i did is like this: (i have entered a rule for the set display : inline but it seems to be not working.)
set of element
set of element
set of element
here is the code
HTML
<div class="service-category">
<img src="img" alt="Web Design">
<div">
<h2>Web Design</h2>
<p>Apple pie icing sweet. Brownie jelly-o applicake applicake sweet roll liquorice bear claw. Jujubes carrot cake cotton candy sweet tart brownie. Tiramisu applicake jujubes. Apple pie icing sweet. Brownie jelly-o applicake applicake sweet roll liquorice bear claw....</p>
</div>
<div class="service-category">
<img src="img" alt="Web Design">
<div >
<h2>Web Design</h2>
<p>Apple pie icing sweet. Brownie jelly-o applicake applicake sweet roll liquorice bear claw. Jujubes carrot cake cotton candy sweet tart brownie. Tiramisu applicake jujubes. Apple pie icing sweet. Brownie jelly-o applicake applicake sweet roll liquorice bear claw....</p>
</div>
<div class="service-category">
<img src="img" alt="Web Design">
<div >
<h2>Web Design</h2>
<p>Apple pie icing sweet. Brownie jelly-o applicake applicake sweet roll liquorice bear claw. Jujubes carrot cake cotton candy sweet tart brownie. Tiramisu applicake jujubes. Apple pie icing sweet. Brownie jelly-o applicake applicake sweet roll liquorice bear claw....</p>
</div>
CSS
.service-category {
display: inline;
max-width: 180px;
}
.service-category img {
max-width: 35%;
}
.service-category p {
max-width: 180px;
text-align: justify;
color: #000;
margin: 0 auto 30px;
pa
Cheers!
2 Answers
Mohamed Ookiyo
22,714 PointsHi! Check your code. Your three main div tags with the class (service-category) are missing a closing tag. After you fix that, please try to use inline-block instead of inline and give them a margin-left property to separate each other.
Aaron HARPT
19,845 Pointsto have a column, you would want to have display: block