+ 1
Hi coders....ive got two images separated by padding the way i want.I put a border around them.Whats happening now is that the b
Hi coders....ive got two images separated by padding the way i want.I put a border around them.Whats happening now is that the border is wrapping around the padding box instead of content.how do i wrap around content without removing padding??
21 Respostas
+ 4
agree with visph
+ 3
make a div and add padding on it and place the image in the div with border
<div style="padding:3px;">
<img src="#"style ="border:1px solid black( as you want)"/>
</div>
<div style="padding:3px;">
<img src="#" style ="border:1px solid black( as you want)"/>
</div>
+ 3
if you want to add padding for only separate images
use margin instead of padding
+ 3
Simply use 'margin' instead 'padding' ^^ not else... ;)
+ 3
No, use 'margin' instead of 'padding' in your css, without adding <div> containers :P
+ 3
Padding is the margin between border and content, margin is about external margin (between border and other elements)
+ 1
???
+ 1
nice visph and akash... thx it worked
0
check description
0
show your code
0
img{
display:block;
clear:right;
float:right;
}
#imgb{
padding:75 0 0 0;
border:1px solid white;
}
#imga{
padding:40 0 0 0;
}
0
OK lemme try
0
didn't work
0
make your code public
0
<section>
<img display="block";>
<div style="padding:40 0 0 0;">
<img id="imga" style="border:1px solid white" align="right" src="back2.jpg" height="350" width="400px";>
</div>
<div style="padding:75 0 0 0;" >
<img id="imgb" style="border:1px solid white" align="right" src="back3.jpg" height="350" width="400px";>
</div>
</img>
#This is what i did ....still the same
0
ok lemme try
0
#with margin still the same
<section>
<img display="block";>
<div style="margin:40 0 0 0;">
<img id="imga" style="border:1px solid white" align="right" src="back2.jpg" height="350" width="400px";>
</div>
<div style="margin:75 0 0 0;" >
<img id="imgb" style="border:1px solid white" align="right" src="back3.jpg" height="350" width="400px";>
</div>
</img>
0
ok
0
thanks it's okay now
0
Add
boz-sizing: border-box;
would solve the issue.