Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

div border not surrounding content

Tags:

html

css

border

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?

like image 306
cdugga Avatar asked Nov 11 '09 16:11

cdugga


2 Answers

try

 overflow: auto
like image 76
Pekka Avatar answered Nov 15 '22 07:11

Pekka


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

like image 28
marcgg Avatar answered Nov 15 '22 05:11

marcgg