worldwidejamie
worldwidejamie

Reputation: 235

Custom CSS Class Not Being Applied

I have some custom CSS being applied to a list of posts. The site is here If you are to check the css classes of the posts, you'll see that the last two css classes are .floats and .colThree.

.colThree is applying just fine and everything is great there. .floats will not apply and I can't figure it out. I thought maybe it was a bad CSS class name but I've changed it a couple of times.

Any help is greatly appreciated. Thanks in advance for your time.

Upvotes: 0

Views: 1139

Answers (1)

Travis Seitler
Travis Seitler

Reputation: 171

I believe the problem is with the comments in your CSS file.

CSS doesn't mark comments the same way HTML does. You have your CSS comments formatted like this:

<!-- commented text goes here -->

...which is the right way to do it in HTML. In CSS, however, you'll want to wrap your comments like this:

/* commented text goes here */

You have two comments near the bottom of your main.css file (lines 1687 and 1690). I tested the page with those comments both reformatted and removed from the CSS file, and confirmed the .float styling was applied in both cases.

Upvotes: 2

Related Questions