/    Sign up×
Community /Pin to ProfileBookmark

Floating and clearing five section tags

I have five section tags that I would like to float so that they are inline with each other. I have used the float / clearfix technique in the past and it has worked. I cannot figure out what i am doing wrong.

CSS:

[code]
#content{ padding:30px 0 0 15px; width: 959px; }

.clearfix:after {
content: “.”;
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}

.clearfix {
display: inline-block;
}

html[xmlns] .clearfix {
display: block;
}

*html .clearfix {
height: 1%;
}

#1, #2, #3, #4, #5 {padding-right:15px; float: left;}
[/code]

HTML:

[code] <div id=”content”>
<section id=”1″>
<img src=”1.png” />
</section>

<section id=”2″>
<img src=”2.png” />
</section>

<section id=”3″>
<img src=”3.png” />
</section>

<section id=”4″>
<img src=”4.png” />
</section>

<section id=”5″>
<img src=”5.png” />
</section>

</div><!– end content–>

<div class=”clearfix”></div>[/code]

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@Jerrell_BauthorOct 13.2012 — unbelievable 2 hours spent and it was not working because of a misspelled word!!!
×

Success!

Help @Jerrell_B spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...