store logo width
How can I make the store logo run across all 12 columns ?
I set the width to 12 but it won't stretch beyond the natural width of the image.
Setting the search bar to 12 works fine, just as a test.
It's my own image and not the Phoenix one.
Thanks
store logo width
-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: store logo width
Existing code in includes/modules/content/header/templates/tpl_cm_header_logo.php: So override with something like It might need some tinkering to get the right effect.
You also might be able to do it in CSS with something likeBut there are others who more au fait with the store CSS than me.
Code: Select all
<div class="col-sm-<?php echo $content_width; ?> cm-header-logo">
<?php echo '<a href="' . tep_href_link('index.php') . '">' . tep_image('images/' . STORE_LOGO, htmlspecialchars(STORE_NAME)) . '</a>'; ?>
</div>Code: Select all
<div class="col-sm-<?= $content_width ?> cm-header-logo">
<a href="<?= $GLOBALS['Linker']->build('index.php') ?>"><?= new Image('images/' . STORE_LOGO, ['class' => 'w-100'], htmlspecialchars(STORE_NAME)) ?></a>
</div>You also might be able to do it in CSS with something like
Code: Select all
DIV.cm-header-logo>IMG {width: 100%}-
Xpajun
- Contributor
- Posts: 187
- Joined: Thu Mar 04, 2021 1:18 pm
- Phoenix Version: v1.0.9.0
- Has thanked: 3 times
- Been thanked: 6 times
Re: store logo width
I think you'll find that the logo image has to be full width plus - the plus is for when someone like me has a 27" monitor and has their browser full screen.
One of the things you will have to do is check what it's like on a mobile
I put my logo over a background - and then I swop the background for a smaller one for mobiles
You can see what I did here: https://xpajun.com/store/index.php
One of the things you will have to do is check what it's like on a mobile
I put my logo over a background - and then I swop the background for a smaller one for mobiles
You can see what I did here: https://xpajun.com/store/index.php
Current Store is now running 1.0.9.0 - php 8.2.18
Now working on taking a short rest
- php 8.2.18
Now working on taking a short rest
-
Nigel
- Contributor
- Posts: 114
- Joined: Mon Jan 11, 2021 1:39 am
- Phoenix Version:
- Has thanked: 29 times
- Been thanked: 8 times
Re: store logo width
Thanks for your example, it's one solution but not exactly what I'm looking for.Xpajun wrote: ↑Wed Sep 08, 2021 7:42 pm I think you'll find that the logo image has to be full width plus - the plus is for when someone like me has a 27" monitor and has their browser full screen.
One of the things you will have to do is check what it's like on a mobile
I put my logo over a background - and then I swop the background for a smaller one for mobiles
You can see what I did here: https://xpajun.com/store/index.php
My actual website index page has the same image and Css grid stretches it and minimizes it perfectly for responsive views.
-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
Re: store logo width
Tested this in user.css and works:
Code: Select all
.cm-header-logo .img-fluid{
width: 100%;
}