Logo Image Centering

tedpruitt
14 years, 1 month ago
I have a logo at 320px wide - when I point to it in the MJ_header module and assign it to the iphone template, it shows up fine - but appears to be left-aligned and reduced in size, so it seems to look small and isn't centered on the menu. I've dug through the template, but I'm lost - any help as to where to fix the size and center it would be most appreciated!

Thanks - Ted
dryabov
14 years, 1 month ago
tedpruitt, open /modules/mod_mj_header/tmpl/default.php and replace
<img src="/<?php echo $imgURL;?>" alt="<?php echo $siteTitle;?>"/>

by
<img src="/<?php echo $imgURL;?>" alt="<?php echo $siteTitle;?>" style="display:block;text-align:center" />


It is temporary solution, in futher versions we will add corresponding option to module settings.
Alfrado Garcia
14 years, 1 month ago
I followed these instructions and replaced the code as described but I got no center alignment on my iPhone header. Any suggestions?
dryabov
14 years, 1 month ago
Try
<img src="/<?php echo $imgURL;?>" alt="<?php echo $siteTitle;?>" style="display:block;text-align:center;margin:0 auto;" />
tedpruitt
14 years, 1 month ago
Still no go on my end on either code. I just get an image marker (box with a question mark) and even that isn't centered. - Ted
tedpruitt
14 years, 1 month ago
Here is how I'm making it work:
 <?php else: ?>
<p style="text-align:center">
<img src="/<?php echo $imgURL;?>" alt="<?php echo $siteTitle;?>" width="100%" />
</p>
<?php endif; ?>
jcole24
14 years ago
You could also use a div tag.

<?php else: ?>

<div align="center"><img src="/<?php echo $imgURL;?>" alt="<?php echo $siteTitle;?>"/></div>

<?php endif; ?>

Worked for me.
Alfrado Garcia
14 years ago
adding the following <div align="center"> in the first line of code prior to the image information code fixed it perfectly for me! Thanks!
fbrace
13 years, 10 months ago
Ok added the changes as stated above and logo image is now centered, width="100%". My image is 1000X210 px but it only fills approx a 1/3 of the screen header on a smartphone. Where do I look to get this to be a full screen image.
url: www.veteranscaucus.org


Thanks, Fred Brace, Dover, DE
Alfrado Garcia
13 years, 9 months ago
Does anyone know the code for maximizing the image. I am trying to have a banner placed in the "mj_all_header " position and have it autosize the picture to the width of the page. Currently, when I view the page www.unifiedsysmgt.com on the iPhone in portrait view it fills out the header position nicely but if I rotate the iPhone to landscape the size of the banner image stays the same as if it were portrait? Same is true on Android or Honeycomb devices.

Any help is greatly appreciated!

Thanks, Alfrado!
1

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.