Check out this code snippet (and yes, I'm using a basic reset.css):
.checkbox { border: 1px solid black; width: 10px; height: 10px; }
<ul>
<li>
<p><div class="checkbox"></div>I agree!</p>
</li>
<li>
<p><div class="checkbox"></div>I disagree!</p>
</li>
</ul>
You can see what my intention is. Basically, I want to create a checkbox-like design. The reason for not using a checkbox tag is because I need to export the content as a PDF where users can physically mark an X through the box. Using a regular checkbox or an image leads to issues with alignment in the PDF.
So, I require the CSS box to align properly. What could I be overlooking? I've experimented with changing the div to display: inline;
but it just vanishes! Even inline-block
doesn't solve the issue.
I diligently searched for a solution but came up empty-handed. If a similar post exists elsewhere, I apologize in advance.
Thank you in advance!