Pages tagged with css

I'm still in the process of tagging pages that were migrated from the old site, so for now you're best off using the search engine rather than relying on the tags.

  • Consistent margins with CSS - Adjacent margins will collapse. CSS tutorial - Margin Collapsing Collapsing Margins In order to have consistent gaps around the edges of a content area you need to ensure the content area has a margin so that it collapses with any contained con...
  • Drop-down menu being hidden - If you get a drop-down menu that’s being hidden behind some content, make sure that all elements surrounding the menu have overflow:visible set and that the menu’s z-index is larger than the elements it need to appear over. E.g. I once worked on a sit...
  • CSS Rounded Borders - Here is one method of creating boxes with rounded corners / borders using CSS, without using the border-radius capabilities of CSS 5 (so it will work on older browsers). Features Fluid / liquid i.e. allows unlimited expansion horizontally and vert...
  • Bugs - Good reference site: Position Is Everything Get margin when no border Problem: A div seems to have a margin when it doesn’t have a border. Giving it a 1px border and the margin disappears.
  • Text shadow - Just a note to say that text shadow is easily achieved in CSS withe the text-shadow property: text-shadow: 1px 1px 1px #EEEEEE; This creates the following: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur pretium massa vitae orc...
  • Accessible hiding content with CSS - Using display:none can also hide content from screen readers. If you do this, best use visibility:hidden as well, to ensure consistent behaviour in all readers. .hide{ display:none; visibility:hidden; } To hide from visual display but not scree...

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top