misheck Posted December 2, 2009 Share Posted December 2, 2009 I am studying css with a book that has directed to use photoshop images for round corners which has left me with 4 images of corners to use. My problem is I have only managed to put 2 corners because I can only specify 1 background image to css tag/attribute which leaves the other side without corners. Here is an example of the html code. <div id="message"> <p><strong>Special offers this week<strong><a href="#"> Click Here</a> </p></div I have put a css background: url(leftcorner.gif) no-repeat bottom left; thats for the corners My problem is how can apply all the 4 corners to the whole page. I have put the corners on the div tag and <p> tag? Sorry I do not have access to my laptop to copy and paste the whole css and html so I hope this is enough info. Quote Link to comment Share on other sites More sharing options...
rlelek Posted December 2, 2009 Share Posted December 2, 2009 Hello, It's odd that you were instructed to have 4 corner images (vs 2 images with 2 corners). Normally What i'd do is this... <div class="top_two_corners"></div> <div class="content">Content goes here</div> <div class="bottom_two_corners"></div> And then use CSS to do the background as you were doing. This way though, your content div can be a normal square box, and the corner divs can be used to add the rounded corners only (no content). Hopefully this makes sense to you If not, i'll try to elaborate more. Ryan Quote Link to comment Share on other sites More sharing options...
misheck Posted December 2, 2009 Author Share Posted December 2, 2009 The book says something about to corners but I didnt quite get thet because that would mean I have to define my width when making the images with makes some restrictions to the width which is something I am trying to avoid. Perhaps you can help by explaining on which 2 images I will need. Thanks Quote Link to comment Share on other sites More sharing options...
FaT3oYCG Posted December 2, 2009 Share Posted December 2, 2009 you place 4 divs inside eachother with no padding or margins specifying one corner in each of the divs styles. Quote Link to comment Share on other sites More sharing options...
misheck Posted December 4, 2009 Author Share Posted December 4, 2009 Thanks. I will do that Quote Link to comment Share on other sites More sharing options...
Chezshire Posted December 7, 2009 Share Posted December 7, 2009 you place 4 divs inside eachother with no padding or margins specifying one corner in each of the divs styles. So brilliant - much easier then using javascript which is what I was doing. I have to go do some recoding - thank you to FaT3oYCG for the tip! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.