I have an element in my header that is getting data from a js file.
I’m trying to center that element in my page but all i do dosent seem to work.
I tried margin-left: auto and margin-right: auto but still is not centering.
The element code is:
<a href="http://[ip]/tunein/tranceilfm.pls" id="cc_strinfo_song_tranceilfm" class="cc_streaminfo" style="margin: 0px; display: block; ">Loading...</a>
(the blue song info in the frame below the menu)
Any thoughts?
This should do it (center the link using
text-align: centerin the parent container):Or simply add
text-align: centerto the element itself:Fiddle