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 ??? 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). 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 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 } 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. Link to comment https://forums.phpfreaks.com/topic/113068-css-box-border/#findComment-582669 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.