3dkingpin
01-27-2012, 10:17 PM
when i position two divs next to each other without borders they position a expected.
When i add a 5px border then the two divs seem to overlap and dont look as wanted.
<DIV id="newdiv1" title="" align="center" style="border: 5px solid #000000 ;overflow:auto; white-space:wrap; top: 5; left: 5; position: absolute; z-index: 101; visibility: show; background-color: #FF00FF; width: 983px; height: 100px; font-size: 20pt; font-family: TIMES NEW ROMAN; color: #000000;"><div style="position: relative; top: 34.50;">DIV1</div></DIV>
<DIV id="newdiv112034" title="" align="center" style="border: 5px solid #000000 ;overflow:auto; white-space:wrap; top: 110; left: 5; position: absolute; z-index: 102; visibility: show; background-color: #FF00FF; width: 983px; height: 100px; font-size: 20pt; font-family: TIMES NEW ROMAN; color: #000000;"><div style="position: relative; top: 34.50;">DIV2</div></DIV>
The problem seems to be that the border is drawn ROUND the div not INSIDE the div so now the div is not h pixels high but h+(border thickness) high.
So is there anyway to draw the border inside the div.
When i add a 5px border then the two divs seem to overlap and dont look as wanted.
<DIV id="newdiv1" title="" align="center" style="border: 5px solid #000000 ;overflow:auto; white-space:wrap; top: 5; left: 5; position: absolute; z-index: 101; visibility: show; background-color: #FF00FF; width: 983px; height: 100px; font-size: 20pt; font-family: TIMES NEW ROMAN; color: #000000;"><div style="position: relative; top: 34.50;">DIV1</div></DIV>
<DIV id="newdiv112034" title="" align="center" style="border: 5px solid #000000 ;overflow:auto; white-space:wrap; top: 110; left: 5; position: absolute; z-index: 102; visibility: show; background-color: #FF00FF; width: 983px; height: 100px; font-size: 20pt; font-family: TIMES NEW ROMAN; color: #000000;"><div style="position: relative; top: 34.50;">DIV2</div></DIV>
The problem seems to be that the border is drawn ROUND the div not INSIDE the div so now the div is not h pixels high but h+(border thickness) high.
So is there anyway to draw the border inside the div.