Welcome, Guest
Username Password: Remember me

Logo Image Centering
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: Logo Image Centering

Logo Image Centering 13 years, 10 months ago #732

  • tedpruitt
  • OFFLINE
  • Junior Boarder
  • Posts: 26
  • Karma: 0
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

Logo Image Centering 13 years, 10 months ago #2890

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
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.

Logo Image Centering 13 years, 10 months ago #2914

I followed these instructions and replaced the code as described but I got no center alignment on my iPhone header. Any suggestions?

Re: Logo Image Centering 13 years, 10 months ago #2931

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
Try
<img src="/<?php echo $imgURL;?>" alt="<?php echo $siteTitle;?>" style="display:block;text-align:center;margin:0 auto;" />

Re: Logo Image Centering 13 years, 10 months ago #2943

  • tedpruitt
  • OFFLINE
  • Junior Boarder
  • Posts: 26
  • Karma: 0
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

Re: Logo Image Centering 13 years, 10 months ago #2944

  • tedpruitt
  • OFFLINE
  • Junior Boarder
  • Posts: 26
  • Karma: 0
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; ?>

Re: Logo Image Centering 13 years, 9 months ago #3207

  • jcole24
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
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.
The following user(s) said Thank You: Alfrado Garcia

Re: Logo Image Centering 13 years, 9 months ago #3502

adding the following <div align="center"> in the first line of code prior to the image information code fixed it perfectly for me! Thanks!

Re: Logo Image Centering 13 years, 7 months ago #3892

  • fbrace
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
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

Re: Logo Image Centering 13 years, 6 months ago #4343

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!
  • Page:
  • 1
  • 2
Time to create page: 0.25 seconds

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.