Steps to Create a Div

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
StormCloud79
Propeller Head
Posts: 20
Joined: Mon Feb 15, 2021 5:11 am

Steps to Create a Div

Post by StormCloud79 »

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.
Capture22.PNG
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
You do not have the required permissions to view the files attached to this post.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Steps to Create a Div

Post by NorthEast »

Why not put both the heading and content inside one div?

HTML:

Code: Select all

<div class="MyBox">
   <h2>Heading</h2>
   <ul>
      <li>List content</li>
   </ul>
</div>
CSS:

Code: Select all

div.MyBox { border: 1px solid black; }
div.MyBox > h2 { background-color: red; }
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).
Post Reply