Hybrid Posted May 22, 2006 Share Posted May 22, 2006 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 More sharing options...
snowboard01 Posted May 22, 2006 Share Posted May 22, 2006 could you give an example? you can put a border around a div same as any element using CSS see http://www.w3schools.com/css/css_border.asp Link to comment Share on other sites More sharing options...
Hybrid Posted May 22, 2006 Author Share Posted May 22, 2006 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 More sharing options...
snowboard01 Posted May 22, 2006 Share Posted May 22, 2006 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 More sharing options...
snowboard01 Posted May 22, 2006 Share Posted May 22, 2006 Why is this in javascript? (no offense) Link to comment Share on other sites More sharing options...
Chocolate570 Posted May 23, 2006 Share Posted May 23, 2006 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 More sharing options...
snowboard01 Posted May 23, 2006 Share Posted May 23, 2006 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? Link to comment Share on other sites More sharing options...
Jack McKalling Posted May 23, 2006 Share Posted May 23, 2006 (edited) Read all about borders here at the site Why is this in javascript? (no offense)Correct, this should be in CSS forum. I suggest movement Edited May 23, 2006 by Dan The Prof Link to comment Share on other sites More sharing options...
Chocolate570 Posted May 24, 2006 Share Posted May 24, 2006 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?<{POST_SNAPBACK}> 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now