It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Formatting a list as a checklist

mike.howells May 14, 2012

I need to be able to format a list on a wiki page as a checklist.

I used to do this before 4.x by using the square style of list - text and defining some custom CSS that changed the list-style-image for ul.alternate:

/* show checkbox when - bullets are used (for checklists) */

div.wiki-content ul.alternate
{
  list-style-image: url(/download/attachments/57802802/checkbox.png);
}

Since 4.0 these lists no longer use a CSS class but have list-style-type: square hard-wired into the HTML.

Is there a way to change the format of a list in 4.x?

3 answers

0 votes
Matthew J. Horn May 14, 2012

Sure, you still can use CSS, you just either have to edit Confluence's CSS directly or apply styles that override the defaults. To do the latter, go to the Site Admin section and click "Stylesheet" under Look and Feel.

Add any overrides you want, but just be sure to put "!important" before the semicolon. For example:

myCustomStyle {

list-style-image: url(/download/attachments/57802802/checkbox.png) !important;

}

You would then add your UL in an HTML macro on the Confluence page, and wrap it in a DIV tag that defines its class as myCustomStyle.

hth,

matt

0 votes

You can do this by entering the following CSS code in your Custom HTML >> At beginning of the BODY. Custom HTML can be found in your Confluence Administration console:

<style>
div.wiki-content ul  
{  
  list-style-image: url(/images/logo/confluence_48_trans.png) !important;  
}
</style>

Sorry, that icon was just a quick test of mine. You can change the icon URL accordingly.

0 votes
mike.howells May 15, 2012

Thanks but the above CSS will apply to all <ul> lists, whereas I only want to show a checklist when people use the square bullet style. They still need to be able to use round bullets normally.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

Confluence CVEs and common questions

Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...

951 views 0 19
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you