Hey when i set a padding for a box all it does is increase the size of the box.
How do i stop this?
css code
Code:padding: 5px;
Thread moved from Web design by --ss-- (Forum Super Moderator): Please post in the correct section.
Hey when i set a padding for a box all it does is increase the size of the box.
How do i stop this?
css code
Code:padding: 5px;
Thread moved from Web design by --ss-- (Forum Super Moderator): Please post in the correct section.
Last edited by --ss--; 08-02-2008 at 07:04 PM.
Publishing free website designs, watch this space!
Total number of designs published: 0
Current work in progress: Landscape Design
Thanks, ive never had this problem before
Publishing free website designs, watch this space!
Total number of designs published: 0
Current work in progress: Landscape Design
Probably because you aren't coding properly, I also used to change the width of the box, but I use the correct attributes and stuff now.
e.g..
<div class="box">
content here
</div>
assuming the box class has no padding styled, and you just add padding: 5px, the box changes size/shape (cant remember exactly)
however, using...
<div class="box">
<p>proper element or whatever</p>
</div>
then in the css ... .box p { padding: 5px; }
everything is resolved
Could you not just use margin instead of padding :S?
Coming and going...
Highers are getting the better of me
Or alternatively you can create a wrapper and put margin on the layers within it.
;veni vidi vici
;i came, i saw, i ownt
Want to hide these adverts? Register an account for free!