|
-
Aug 5th, 2009, 03:11 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] Float Right and Margin-Right ???
Hi Peeps,
I have two divs; one floats left and the other floats right so they run next to each other. They are both in a container div. I want to bring my right div in by 20px but when I use margin-right: 20px or padding-right: 20px it does not seem to do anything. Here is the CSS:-
Code:
#ctl00_Content_ContentPage_Links
{
padding-right: 41px;
width: 200px;
color: black;
float: right;
text-decoration: none;
font-family: Verdana;
font-size: 8pt;
font-weight: bold;
background-color:Lime;
}
Thanks again for any help in my long struggle with layouts,
Jiggy!
-
Aug 5th, 2009, 06:08 AM
#2
Re: Float Right and Margin-Right ???
Use > margin-right:41px;
padding is internal to the element and by default everything will be aligned left in the div so right padding will not do anything.
if margin-right does not work then you have another style or something effecting the div that's overriding it
-
Aug 5th, 2009, 11:53 AM
#3
Thread Starter
Frenzied Member
Re: Float Right and Margin-Right ???
Hi Mate,
I think I know what was happening; I think the margin-right is putting a margin-right inside the div and not the outside. I put a margin-right on the container div and it worked.
Thanks for your help,
Jiggy!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|