Reputation: 199
<article id='Focus'>
<h1 id='main'>Focus</h1>
<article id='Tell'>
<h1>Tell</h1>
</article>
<article id='NStart'>
<h1>NStart</h1>
</article>
<article id='FSB'>
<h1>pppp</h1>
</article>
</article>
I have this html code and I want to make it so that its all aligned on the same line, with one positioned left, another in the centre and the other on the right. I have tried using float and text-align but these don't work. What CSS should I be looking at to make this work?
Upvotes: 0
Views: 56
Reputation: 903
Tou can use this css:
#Focus article {
width: 33%;
float: left;
}
Here is the jsfiddle
Upvotes: 0
Reputation: 13145
Would this solution be good for you? DEMO
Html
<article id='Focus'>
<h1 id='main'>Focus</h1>
<br/>
<article id='Tell'>
<h1>Tell</h1>
</article>
<article id='NStart'>
<h1>NStart</h1>
</article>
<article id='FSB'>
<h1>pppp</h1>
</article>
</article>
CSS
article {
width:33%;
float:left;
text-align:center;
}
#Focus {
width:100%;
}
Upvotes: 1