Posts Tagged CSS

CSS Shorthand, Step by Step How-To

By Linda Chadbourne | May 9th, 2008 |

Once you’ve mastered the use of CSS, take your knowledge one step further by learning how to code sites using CSS shorthand. Not only will it neaten up your code, it will save you coding time and reduce the file size of your pages.

The different properties that can be shortened include: border, background, font, list-style, margin, and padding.

Continue reading …

Adding a Caption to an Image with CSS

By Linda Chadbourne | March 17th, 2008 |


Want an easy way to add a caption to an image like this?

HTML

<div class="imagecaption">
<img src="your-image-here.jpg">
<alt="Stacked" width="150" height"100" /><p>Orange Pyramid</p> </div>

CSS

.imagecaption {
      width: 200px;
      border: 1px solid #999999;
      padding: .5em;
      }
p {
      font: small Verdana, Arial, Helvetica, sans-serif;
      text-align: center;
      }