Title: CSS &#8211; centre a Javascript image
Last modified: August 30, 2016

---

# CSS – centre a Javascript image

 *  [stepfaul](https://wordpress.org/support/users/stepfaul/)
 * (@stepfaul)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/css-centre-a-javascript-image/)
 * Hi All,
 * I am using the WooThemes Canvas theme and have the code below in a text widget
   in the footer of my site to display a badge which when selected, links to a status
   page with details of the SSL certificate I am using.
 * The code for the badge is below, one line of code displays a badge stating that
   JavaScript needs to be enabled, the line other displays a 123 ssl badge if JavaScript
   is enabled:
 *     ```
       <span id="s3_al_uk_123-Reg_130-65_image_en">
       <alt="SSL Certificate" border=0 id="ss_img"  src="https://seal.alphassl.com/SiteSeal/images/gs_noscript_130-65_en.gif">
       </span><script type="text/javascript" src="https://seal.alphassl.com/SiteSeal/uk_123-reg/alpha_image_130-65-b_en.js" defer></script>
       ```
   
 * I would like to centre the badge rather than have it left aligned but I can’t
   seem to do this.
 * I have tried the same markup as I used to centre some images contained in the
   footer –
 * `<img class="displayed"`
 * but this did not work because the above relates to an image and not JavaScript
   I believe. Does anyone have any ideas on how to centre the badge?
 * The badge can be found in the third column of the footer (Safety & Security) 
   here – [http://littletigergifts](http://littletigergifts) co uk/wptest
 * Regards
 * Steve

Viewing 1 replies (of 1 total)

 *  [jitendrajoshi](https://wordpress.org/support/users/jitendrajoshi/)
 * (@jitendrajoshi)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/css-centre-a-javascript-image/#post-6895379)
 * Add the following CSS rule:
 * div#text-5 .textwidget {
    text-align: center; }

Viewing 1 replies (of 1 total)

The topic ‘CSS – centre a Javascript image’ is closed to new replies.

## Tags

 * [canvas theme](https://wordpress.org/support/topic-tag/canvas-theme/)
 * [css](https://wordpress.org/support/topic-tag/css/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [jitendrajoshi](https://wordpress.org/support/users/jitendrajoshi/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/css-centre-a-javascript-image/#post-6895379)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
