Click to See Complete Forum and Search --> : division question in css


mwmwnmw
11-17-2006, 03:05 PM
Ok, the programmer guy is embarking on a design challenge. Bad, bad idea... Anyway, the first of what I'm sure will be many questions is probably a simple one. I'm trying to add a border to a division but I want rounded edges so it's probably easier to use an image as a background to the division. Anyway, if I make this image and set it as the background in the division section of my css, can I then add text over the top or do I need to use another division and layer it on top of that one. If it's the latter, a little help with the layering would be appreciated. I understand the z index thing, but I always get hosed up trying to figure out whether I should nest the division tags, use absolute positioning on one and not the other... all of that. Anyway, any thoughts would be appreciated. FWIW, the code I tried in my css to just add a border there was ...

border-width: 2px;
border-color: #3d4559;

That accomplished absolutely nothing, unfortunately.

KDLA
11-17-2006, 03:19 PM
You can do either: there's no wrong answer. It's all dependent upon the amount of control you want to have. If you forego the nested div technique, you may want to style your text tags, such as <h1> or <p> to have some padding or margins so that they do not span farther than the width/height of your div.
Here's a good article that might help: http://kalsey.com/2003/07/rounded_corners_in_css/

KDLA