Margin CSS property not working [ solved ] There are some CSS properties that Don't work alone, so you must add another property in order for it to work, margin Doesn't work without displayCSS property , look at this example to understand me. without display style <style> table { padding: 5px; border-radius: 5px; box-shadow: 0 0 3px 0; } tbody { margin-top: 40px; margin-bottom: 10px; } </style> <table > <thead><tr><td colspan="2"style="background:#eee">link</td></tr></thead> <tbody> <tr><td>title:</td><td><input type="text"/></td></tr> <tr><td>url</td><td><input type="url"/></td></tr> <tr><td>description</td><td><input type="text"/></td></tr> </tbody> </table> with display style <style> table { padding: 5px; border-radius: 5px; box-shadow: 0 0 3px 0; } tbody { display: block; margin-top: 40px; margin-bottom: 10px; } </style> <table > <thead><tr><td colspan="2"style="background:#eee">link</td></tr></thead> <tbody> <tr><td>title:</td><td><input type="text"/></td></tr> <tr><td>url</td><td><input type="url"/></td></tr> <tr><td>description</td><td><input type="text"/></td></tr> </tbody> </table> © Manajmnt code Share to : ☷✎ Comments
Comments
Post a Comment
message