There is a problem with styling footer and with class "sloupec1" and "sloupec2"please help me.
<footer>
<div class="sloupec1">
<h3>VŠE O NÁKUPU</h3>
<ul>
<li><a href="#">Obchodní podmínky</a></li>
<li><a href="#">Možnosti doručení</a></li>
<li><a href="#">Možnosti platby</a></li>
</ul>
</div>
<div class="sloupec2">
<h3>O SPOLEČNOSTI</h3>
<p>Základní informace</p>
<p>Kontakt</p>
</div>
<div class="copyright">
© 2023 Mojezahrada.cz Všechna práva vyhrazena.
</div>
</footer>
I need to style 2 columns adjacent, tried float but it don’t work. So I ask AI it only tell me something with flexbox, but it don’t work well. I need to get really similar footer like this:
Web design:
https://cdn.discordapp.com/attachments/1083872226476032121/1083873552274554920/tohle_je_navrh_webu_upraveno.png
all code (html+css) without images:
https://pastebin.com/KSfguz0j
Next problem is I need to make this website responsive.
2
Answers
Here is how you can use
display: flex;
to place 2 divs adjacent to each otherDo this, it will work.
In this code, I added a div and applied flex display to it and by default the justify-content value is flex-start so just add auto margins to the 2nd div and it will be centered in the only available empty space.