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
PLUS
Caroline Hagan
Courses Plus Student 12,452 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.