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

CSS CSS Selectors Selectors - Beyond the Basics DRY CSS

Craig Curtis
Craig Curtis
19,985 Points

Placement of inln class before default and error class matters...

I placed the inln class after the default and error classes, and the buttons still displayed as block-level elements.

However before these two classes, they displayed properly as inline-block.
This must be a cascading issue.

4 Answers

I would also wanted to know why if i place the inln class after the default and error classses nothing happens and buttons still stay block-level elements:
<input class="btn default inln" type="submit" value="Submit"> <input class="btn error inln" type="reset" value="Reset">

Caroline Hagan
Caroline Hagan
12,612 Points

Hi Craig Curtis can you pop a reference to which video/quiz you are referring to, or pop in your code and we can help you further with this :-)

Craig Curtis
Craig Curtis
19,985 Points

In the end it was (I believe) a cascading issue, having to place that code at the bottom and/or be more specific with the selectors.

Which video/lesson - I will be sure to add the link + title in future questions.

Skol!

Craig Curtis
Craig Curtis
19,985 Points

In the end it was (I believe) a cascading issue, having to place that code at the bottom and/or be more specific with the selectors.

Which video/lesson - I will be sure to add the link + title in future questions.

Skol!

Hi Craig,

I do not believe it's the problem of cascading, since there is no overriding of CSS declarations in all 3 classes. I have tried placing inln before default and error, and it works fine for me in Firefox. You might want to check if your browser window size is affecting it, since the inline-block in the CSS only works if the window is more than 769px. Or perhaps, check your codes again if the browser window size is not the issue.

Joe Dolan
Joe Dolan
2,276 Points

my code is identical, it just doesn't work.