Firefox Bozos
- Started
- Last post
- 8 Responses
- ukit0
Maybe it is your understanding of HTML that is the issue...
- ukit0
When you talk about margins within a div, do you mean padding or margins on an element within another div element?
- Redmond0
Listen, I tried margin: 1px 1px 1px 1px; padding: 1px 1px 1px 1px;
Sorry for being rude, I just got fed up of the "top solutions" I was getting in google which didn't provide me with any answer.
- ukit0
If you post an example I can tell you what the issue is.
Also read this:
http://www.w3.org/TR/CSS21/box.h…
The display type of your elements determine how margins are rendered.
- ukit0
Just to give you a simple example:
<div style="padding:12px">
Some text
</div>will produce a margin around the text.
Now, if you needed to produce a margin based on the text block itself rather than the container, you could do this:
<div>
<p style="margin:12px">
Some text
<p>
</div>And you are right that that will not work, however, if you define the internal element as either a float or an inline-block it will.
<div>
<p style="margin:12px; display:inline-block">
Some text
<p>
</div>
- Redmond0
lol None of these work AT ALL . Both S & FF treat the text like it was the same width as the DIV. However the good news is that DING!DING!DING! I have found a cross browser solution to my problem. By encasing it in a paragraph, as you suggested, and specifying the width minus the right margin I wanted.
Thanks!
- ukit0
LOL OK
Here - I uploaded the quick test page I did if you want to take a look. Renders perfectly in FF and S for me.