Need to get an image in the header centered | XM Community
Solved

Need to get an image in the header centered

  • 10 July 2018
  • 3 replies
  • 185 views

Userlevel 6
Badge +5
Would anyone be willing to share some code with me for centering an image within the header? I am inexperienced with coding and in the past I have gotten around this issue by centering a table and placing the image within the table. That no longer seems to be compatible with mobile devices so I am in need of a new way to center an image in the header.

Any help would be greatly appreciated!

- David
icon

Best answer by TomG 10 July 2018, 23:54

View original

3 replies

Userlevel 7
Badge +27
There are several ways to do this, but this is probably the simplest:
```
<div style="text-align: center;"><img alt="alt_text_here" src="image_url_here" style="max-width:100%;margin:auto;"></div>
```
Userlevel 6
Badge +5
Much appreciated. Thank you @TomG
is there a NON code way to do it for those of us who dont understand either the code or where/how to use it?

Leave a Reply