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
Yassin Mzaik
Courses Plus Student 7,454 PointsWhat's the point in adding display:block;
since we're styling <a> inside a <li> tag which is a block element by default.
what did we achieve here ?
1 Answer
Andrew Booth
1,578 PointsSometimes explicitly telling the browser to execute a command, i.e. display: block; can sometimes be necessary, as due to CSS's cascading nature sometimes things can get a bit messy. It may feel a bit unnecessary, but trust me, sometimes it can come in handy when you give specifics on what the browser must follow when reading your code.