Title: Custom CSS align logo right.
Last modified: August 30, 2020

---

# Custom CSS align logo right.

 *  Resolved [Najm](https://wordpress.org/support/users/gcsaudi/)
 * (@gcsaudi)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/custom-css-align-logo-right/)
 * Hi there,
 * Am trying to align my logo to the right of the document. Is there a CSS code 
   for this?
 * Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/custom-css-align-logo-right/#post-13339998)
 * Hi! Technically this is possible with CSS, but it’s a bit of a hack because the
   logo and shop address are printed in a table rather than aligned from the same
   base.
    You can try this:
 *     ```
       .head.container,
       .head.container > tr,
       .head.container > tr > td,
       .head.container > tbody,
       .head.container > tbody > tr,
       .head.container > tbody > tr > td {
       	display: block;
       }
   
       .head.container {
       	padding-bottom: 8mm;
       }
   
       .head.container td.header {
       	float: right;
       	width: 60%;
       }
       .head.container td.shop-info {
       	float: left;
       	width: 40%;
       }
       ```
   
 * But you may need to tweak this further to clear the elements below it.
    It is
   probably easier (if you’re already editing the template anyway) to simply switch
   the order of the columns:
 *     ```
       <table class="head container">
       	<tr>
       		<td class="shop-info">
       			<div class="shop-name"><h3><?php $this->shop_name(); ?></h3></div>
       			<div class="shop-address"><?php $this->shop_address(); ?></div>
       		</td>
       		<td class="header">
       		<?php
       		if( $this->has_header_logo() ) {
       			$this->header_logo();
       		} else {
       			echo $this->get_title();
       		}
       		?>
       		</td>
       	</tr>
       </table>
       ```
   
 * Hope that helps!
 *  Thread Starter [Najm](https://wordpress.org/support/users/gcsaudi/)
 * (@gcsaudi)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/custom-css-align-logo-right/#post-13354993)
 * Thank you so much [@pomegranate](https://wordpress.org/support/users/pomegranate/)
 * Should the css be added to the custom css in the wordpress customizer? or in 
   the plugin css file?
 * Thanks
 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/custom-css-align-logo-right/#post-13355474)
 * WordPress customizer only affects your site. You can either add this to the PDF
   by [using a filter](https://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/using-custom-styles/)
   or directly in `style.css` if you have [created a custom PDF template](https://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/creating-a-custom-pdf-template/).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Custom CSS align logo right.’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-pdf-invoices-packing-slips/assets/icon-256x256.
   png?rev=2189942)
 * [PDF Invoices & Packing Slips for WooCommerce](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/reviews/)

## Tags

 * [logo alignment](https://wordpress.org/support/topic-tag/logo-alignment/)

 * 3 replies
 * 2 participants
 * Last reply from: [Ewout](https://wordpress.org/support/users/pomegranate/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/custom-css-align-logo-right/#post-13355474)
 * Status: resolved