Firefox Padding

Soldato
Joined
30 Nov 2005
Posts
3,084
Location
London
I have been trying to add some padding to a Div sidebar but there is a problem with the appearance in Firefox.

When I add padding to the Div when viewed in Firefox it not only moves down the required pixels (as wanted) but it also moves to the left a little and thus outside of the Div sidebar, overlapping its border (not wanted).

I would rather not post my code on here and I know it's a long shot in doing so but any ideas what could be triggering movement horizontally?
 
Here is the code for that section:

#sidebarright{
padding:5px;
float: right;
width:150px;
background-color: #12018E;}

If I remove the padding Firefox displays it within the bar.
 
Doesn't work, what happens is that the wording stays in the same place but it appears if it overlaps the border.

Example when padding to left added - 5px 0 0 5px;
withpaddingleftbv7.jpg


Example when padding - 5px 0 0 0;
withoutpaddingleftxg6.jpg
 
Makes no difference, when I remove the float: right; the position is obviously wrong by the padding:5px 0 0 5px; works.

What could do the problem with the float?
 
Back
Top Bottom