Firefox Bozos

Out of context: Reply #6

  • Started
  • Last post
  • 8 Responses
  • 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>

    • Sorry...closing p tags should be </p> obviouslyukit
    • But you get the ideaukit

View thread