Hello
I'm sure this must have been asked a 1000 times before but I really can't find the information I want, and I wish would madcap would do some videos on how to do some more complex things. I know how to achieve styling etc but what I don't know how to do is to put 2 divs together to create 1 thing.
I want to create two divs - one that has a heading and one that is another block underneath to allow me to put in bullet point text.
I created 2 div's and tried to put them together in the editor but then everything just goes out of alignment is there some simple steps to follow to achieve this?
Thank you
Steps to Create a Div
-
- Propeller Head
- Posts: 20
- Joined: Mon Feb 15, 2021 5:11 am
Steps to Create a Div
You do not have the required permissions to view the files attached to this post.
Re: Steps to Create a Div
Why not put both the heading and content inside one div?
HTML:
CSS:
If you want the heading to left align with the text in the list items, then you need to add padding-left on the h2 above to match the left margin/padding you've set for the (on the ul or li tags).
HTML:
Code: Select all
<div class="MyBox">
<h2>Heading</h2>
<ul>
<li>List content</li>
</ul>
</div>
Code: Select all
div.MyBox { border: 1px solid black; }
div.MyBox > h2 { background-color: red; }