Jump to content

Outline or borders around div boxes


goldenbuckles

Recommended Posts

I cannot figure out how to add an outline around my div boxes for my website. I have looked things up, but none seem to work for me. All my div boxes will be outlined with the same html, so a css command is needed also (in order to make it easier). I would like the following as specifications:

 

2px outline

color silver

left: 45px

width 220px

height 150px

style solid

 

Can anyone help me out?

Edited by goldenbuckles
Link to comment
Share on other sites

IE6 and IE7 don't support the outline property so you might have to use conditional comments and borders for them, but remember that borders add to the div width while outlines are outside and don't affect the total width.

 

Edit: although the w3schools link says that outline is supported by all major browsers, if you use outline: none; in IE6 or IE7 it doesn't work, so although IE shows the dotted Outline around links, you can't get rid of it. Edit again: just tested IE7; outline doesn't work but Firefox OK.

Edited by Wickham
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...