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!
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

Alex Valentine
Courses Plus Student 3,368 PointsBottom border spans across the page
Hi Everyone,
For some reason, the bottom border of my .callout class seems to span across the page, rather than just under the text.
The CSS is written as the following: .callout { font-size: 1.25em; border-bottom: 3px solid; margin-top: 20px; padding: 10px 10px; display: inline-block;
(http://port-80-erao6htxx6.treehouse-app.com/), not sure if that link is accessible :) )
Could you possibly help me understand why this is happening?
4 Answers

Alex Valentine
Courses Plus Student 3,368 PointsAmazing :)... Thanks for this, Kevin... That's so helpful!!

Mike Wagner
23,559 PointsKevin Dang appears to be correct. If you remove the
a:link {
display:block;
}
property from your css you should be good

Alex Valentine
Courses Plus Student 3,368 PointsCan, I just ask though (and excuse my ignorance)... As I've only added the .callout class later within the CSS, shouldn't it overide the a:link { display:block;}? I simply assumed this as it's cascading?

Kevin D
8,646 PointsThe link you provided expired - but I think this would be a useful read: https://developer.tizen.org/dev-guide/web/2.3.0/org.tizen.mobile.web.appprogramming/html/guide/w3c_guide/dom_guide/html_priorities_css.htm

Alex Valentine
Courses Plus Student 3,368 PointsThank you Kevin. That's very helpful... I'm still just a tiny bit confused as to why it matters about the previous css statement, as the later statement in the CSS and therefore automatically overrides the previous statement no?

Kevin D
8,646 PointsYep you're right! So the 'later' the styling, the more priority it should have. If you do this:
a.callout {
}
instead of just:
.callout {
}
it will work the way you're thinking!
Kevin D
8,646 PointsKevin D
8,646 PointsLooks like it's inheriting the styling from the <a> tag. It's overriding the display:-inline-block; to just display: block;
So just take out the display: block; from the <a> styling and it should work!
http://stackoverflow.com/questions/9189810/css-display-inline-vs-inline-block