-
Notifications
You must be signed in to change notification settings - Fork 863
Hide-for-small turning inline elements into blocks #44
Comments
Hi, |
Hi Ole, on the right hand side, the "Catania" event has an end and a start date Niccolò Mineo 2014-05-21 11:02 GMT+02:00 Ole Fredrik Lie notifications@github.com:
|
The visibility classes inherit the display property of their parent. In your case the parent is a paragraph (which is a block element), so .hide-for-small-only will behave as a block element for any screen other than small. A fix could be to apply a new class to your span element, and set the display property to inline for that spesific class. |
I changed the paragraph to a div with "event-date" class, and I have the Niccolò Mineo 2014-05-21 12:34 GMT+02:00 Ole Fredrik Lie notifications@github.com:
|
A standard div will also act as a block element, unless otherwise specified. Add this to your css, and you will be good to go: |
thanks! Niccolò Mineo 2014-05-21 13:30 GMT+02:00 Ole Fredrik Lie notifications@github.com:
|
You're welcome! |
This happens with Foundation button classes as well.
is now display:block and takes up the whole width. Any fix for this? |
Use .hidden-for-$size or .visible-for-$size - where $size can be a combination of 'small', 'medium', 'large', and you can further add '-only', '-up', or '-down'. EX: .hidden-for-small or .visible-for-medium-up will hide the element for small screen media query without affecting the display property. |
Inline elements (e.g. span) are turned into block elements when the visibility classes are applied. I read here that this was fixed in Foundation: foundation/foundation-sites#887
But I still have the same problem.
The text was updated successfully, but these errors were encountered: