5

HI i want to give my div's some border but when i do a box is created with all the borders but the contents of teh div are not surrounded!! Any suggestions?

cdugga
  • 3,849
  • 17
  • 81
  • 127

2 Answers2

20

try

 overflow: auto
Pekka
  • 442,112
  • 142
  • 972
  • 1,088
  • This will add scrollbars on overflow. If you (like I) were looking for how to get the div to extend (shrinkwrap) to its contents size, see: http://stackoverflow.com/questions/450903/make-css-div-width-equal-to-contents – apeiros Jan 03 '13 at 19:01
1

You must have some floating content inside.

<div id="divWithBorderIssue">
   blah
   <div style="clear:both;"></div>
</div>

You could also use a clearfix

edit: of course if you provided the code it would be easier to help you

marcgg
  • 65,020
  • 52
  • 178
  • 231