Viewing 1 post (of 1 total)
  • Author
    Posts
  • #27113

    Hello,

    I ran into the following issue using containers that float in combination with margin-left and %-based distances (in 3.9.9fx3a1).
    The CSS I use looks like

    .container {
    float: left;
    width: 20%;
    margin-left: 5%; // not for the first container
    }
    
    <div class="container">1</div>...

    however the margin-left seems to be ignored (well – actually it just seems to be really, really small). If I set margin-left to some pixel value it ends up clearly visible in the generated pdf. The difference can be seen here:
    Image from the forum topic: Floating elements with margin(*left) using %

    I tried changing float to inline-block, but the result did not change. If I set margin-left to 100% the margin between the containers is visible – though I do not know where it takes the original width from.

    Is this something that is known and / or is there any way to work around this (while still maintaining %-based values and a non-table approach)? Maybe there is something in the documentation that I missed?

    Best regards and have a nice day!

Viewing 1 post (of 1 total)

The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.