Jump to content

How would I get borders with DIV's?


Hybrid

Recommended Posts

Hi,I was wondering if there is a way to show borders with DIV's sometimes or those are pictures. What I mean is if I want to have some menus I would like to show a border around it since it looks nicer, now are those pictures or a border made by coding?

Link to comment
Share on other sites

I have seen some sites with border around areas yet their areas are not tables but div's. So my question is how would that be done, but I think that link to the css borders answered it! Thanks for the help snowboard01!

Link to comment
Share on other sites

You may have to set the height and width of the div so that they are the same size as the images. then add borders.heres an example.

<html><head><style type="text/css">#imageborederdiv{width: /*make this value the same as the image*/height: /*once again set to sam e as div*/border-color:/*choose a colour*/border-style-type:/*pick one I use solid*/border-width: /*A tiny border is 1-2px a noticapble one is 4-7px an off the scale on is anything highers*/}</style><body><div id="imageborderdiv"><img src="<!--where you put the image-->" /></div></body></html>

There are things that can be added to this for a better look and feel but this will probably cut it. If you ever need any help I like being PMed

Link to comment
Share on other sites

Why don't you just use a background image?

<style type="text/css">bordDiv {  background-image: url("url") no-repeat; }</style>

Link to comment
Share on other sites

Forgive me but you are saying she should make a background image slow down load times and go to all that work to give a menu a little black border?

From what i'm reading, he's saying he wants more than a regular border, he wants a fancy border. And you can't do that with regular css, unless you're the guy who runs CSSPlay. :)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...