hmvrulz Posted July 3, 2008 Share Posted July 3, 2008 how to create the free products heading over the border... with the border cut for tht part of the box ??? Quote Link to comment https://forums.phpfreaks.com/topic/113068-css-box-border/ Share on other sites More sharing options...
haku Posted July 3, 2008 Share Posted July 3, 2008 Well, what they have done is kind of a hack, in that that is supposed to enclose form inputs, but this is how you can do it: <fieldset> <legend>free products</legend> <p>some copy about what they will find...</p> </fieldset> You may not need the fieldset tags - I've never tried without (fieldsets and legends go together). Quote Link to comment https://forums.phpfreaks.com/topic/113068-css-box-border/#findComment-580842 Share on other sites More sharing options...
hmvrulz Posted July 3, 2008 Author Share Posted July 3, 2008 thanx Quote Link to comment https://forums.phpfreaks.com/topic/113068-css-box-border/#findComment-580989 Share on other sites More sharing options...
ToonMariner Posted July 6, 2008 Share Posted July 6, 2008 it would be so much easier to just use semantic markup... you can play around a little but the example below would achieve the desired layout except the header would not be centered - you'll just have to play a little more... <div class="infoitem"> <h2>Section Title</h2> <p>some copy about what they will find...</p> </div> the css div.infoitem { border: 1px solid #ccc; margin-top: 1.5em; } div.infoitem h2 { float: left; position: relative; top: -1em; margin: 0 0 -1em 20px; background: #fff; color: #ccc } Quote Link to comment https://forums.phpfreaks.com/topic/113068-css-box-border/#findComment-582617 Share on other sites More sharing options...
dannyb785 Posted July 6, 2008 Share Posted July 6, 2008 it would be so much easier to just use semantic markup... you can play around a little but the example below would achieve the desired layout except the header would not be centered - you'll just have to play a little more... <div class="infoitem"> <h2>Section Title</h2> <p>some copy about what they will find...</p> </div> the css div.infoitem { border: 1px solid #ccc; margin-top: 1.5em; } div.infoitem h2 { float: left; position: relative; top: -1em; margin: 0 0 -1em 20px; background: #fff; color: #ccc } I agree completely. Because in my experience, the fieldset/legend/etc are interpreted differently by different browsers. Check how it looks in FF, then IE, and then safari. I almost guarantee it wont look the same. Quote Link to comment https://forums.phpfreaks.com/topic/113068-css-box-border/#findComment-582669 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.