I have a blog and I want to put my text inside a border/wrapper. So I've made the border and sliced it up into 3 parts: top middle and bottom. I want to place the text content within the middle of this graphic and so I figure I need to make the sliced images as a background using css and then type whatever I want over it. So I did this but dont know what Im doing wrong: <style type="text/css"> top {background: url('/images/t1.gif') ;} middle {background: url('/images/t2.gif') ;} bottom {background: url('/images/t3.gif') ;} </style> <div class="top" id="top"></div> <div class="mid" id="mid"> <div class="content" id="content">[COLOR="red"]Content Goes Here[/COLOR]</div> Â </div> <div class="bottom" id="bottom"></div> Code (markup): Any help is appreciated. JH
Couldnt you use something like: <html> <head> <style type="text/css"> top {background: url('/images/t1.gif') ;} middle {background: url('/images/t2.gif') ;} body {background-image:url('/images/t2.gif');} </style> </head> <body> <h1>Content Goes Here</h1> </body>
I'm not sure why you had classes in each div along with IDs, but it is unneeded and you didn't have anything for them in CSS. Everything I changed i mentioned above where i did it in bold and underlined. See if that helps.
If you want it to be a legitimate border.. css3 has an border-image property that works quite well. Of course this is incompatible with older systems. http://www.css3.info/preview/border-image/