{"id":5142,"date":"2025-09-27T20:25:17","date_gmt":"2025-09-27T19:25:17","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=5142"},"modified":"2025-10-01T19:46:12","modified_gmt":"2025-10-01T18:46:12","slug":"links-kill-flex-layout","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/css\/flexbox\/links-kill-flex-layout","title":{"rendered":"Links kill flex layout"},"content":{"rendered":"\n<p>Links default to display:block;<\/p>\n\n\n\n<p>You can add this to the container to solve:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.MyFlexBlockContainer a {\n  display:contents;         \/*Stop links addding default display:block property and killing flexblock layout*\/\n}<\/code><\/pre>\n\n\n\n<p>Or you can set it to the link instead:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  &lt;a href=\"\/some-page\" style=\"display: contents\" &gt;\n    &lt;div class=\"MyFlexObject\"&gt;\n\n    &lt;\/div&gt;\n  &lt;\/a&gt;\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Links default to display:block; You can add this to the container to solve: Or you can set it to the link instead:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[367],"tags":[],"class_list":["post-5142","post","type-post","status-publish","format-standard","hentry","category-flexbox"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/5142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/comments?post=5142"}],"version-history":[{"count":2,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/5142\/revisions"}],"predecessor-version":[{"id":5151,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/5142\/revisions\/5151"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=5142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=5142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=5142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}