Archive

Posts Tagged ‘border’

CSS Borders

March 22nd, 2008

Just a quick tutorial to inform you about the border property!

Everyone knows you can do

 
border: 1px solid black;

Yeah?
Okay. That's all nice, but what if you want a little white border between your actual border and the image to make it stand out even more?!
It's all possible with the power of CSS! Just be creative!

 
img {
padding: 1px;
border: 1px solid black;
background-color: white;
}

That would make all your images one pixel larger, add a black border, then a white border, and finally the image itself. For example:
Border showoff Border showoff

First one being a dashed orange border and second one with a 1px white border between the actual border.

This made me think of a post to explaining the CSS Box Model. Coming up next...!

Popularity: 9% [?]

Graphical, Tutorials ,