|
The short answer is that you cannot put a top or bottom margin on an inline element.
The <a> tag is an inline element, and should appear inside a block element like <p>.
The correct solution would have been to cast the <a> element as an inline-block:
[In CSS]
a.withMargin
{
display: inline-block;
margin: 50px 10px;
}
But the "inline-block" unfortunately is not supported by all browsers. For me, Firefox 2 didn't respond to it.
Instead I believe you should put the margin on the containing block element.
I don't know if there is a better solution in your specific case, but if you post some of your code and explains how it should look, we might find out.
For instance - if your link is not inside a <p> tag and really is not part of a line of text, you can just put "display: block" on it and it will behave like a normal block element and have whatever margins you set.
Jakob
|
|
Expert:
|
jgivoni
|
|
Date:
|
Mar 07, 2007
|
|
Time:
|
08:20
|
|
|
|
Votes: Good (0) | Bad (0) Login to rate this answer
|
|
|
Thanks Jakob
|
|
Expert:
|
sbjc23
|
|
Date:
|
Mar 12, 2007
|
|
Time:
|
18:40
|
|
|
|
Votes: Good (0) | Bad (0) Login to rate this answer
|
|
|
|
|
|
|
This question has been answered, and points have been rewarded to the following experts:
You're welcome however to comment or give additional information or if you wish, you have the ability to write an Answer Summary for this question by clicking on the "Answer Summaries" Tab.
|
|