Jump to content

Adjusting positions of logo, nav, and menu layers


Recommended Posts

I am tweaking the look of the default theme in 1.6 and would like input on the safest way to achieve this layout with css.

Image 1 is default layout

Image 2 is how I would like to have it laid out.

Basically, I want to split the screen and have the logo layer to fill up to the banner and the nav/user info layer and block-top to the right - hope the images are clear. Also would like to add divider pipes to menu titles

 

 

 

 

post-463404-0-53406400-1405621170_thumb.jpg

post-463404-0-95614400-1405621553_thumb.jpg

Edited by Whispar1 (see edit history)
Link to comment
Share on other sites

in header.tpl you've got code:

<div class="container">
							<div class="row">
								<div id="header_logo">
									<a href="{$base_dir}" title="{$shop_name|escape:'html':'UTF-8'}">
										<img class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}"{if isset($logo_image_width) && $logo_image_width} width="{$logo_image_width}"{/if}{if isset($logo_image_height) && $logo_image_height} height="{$logo_image_height}"{/if}/>
									</a>
								</div>
								{if isset($HOOK_TOP)}{$HOOK_TOP}{/if}
							</div>
						</div>

change it to:

						<div class="container">
							<div class="row">
								<div id="header_logo">
									<a href="{$base_dir}" title="{$shop_name|escape:'html':'UTF-8'}">
										<img class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}"{if isset($logo_image_width) && $logo_image_width} width="{$logo_image_width}"{/if}{if isset($logo_image_height) && $logo_image_height} height="{$logo_image_height}"{/if}/>
									</a>
								</div>
							</div>
                            <div class="row">
                            {if isset($HOOK_TOP)}{$HOOK_TOP}{/if}
                            </div>
						</div>

and in global.css use styles:
 

header .row {width:50%; float:left;}
  • Like 1
Link to comment
Share on other sites

Thank you Vekia! I really appreciate it.

Can you clarify which instance of header .row I need to change (there are a lot of instances in global.css)

I am assuming it is line 5288

 header .row {
    position: relative; }

Do I leave the position as relative?

If I change header .row to 50%, it also shrinks the logo by 50% and also the nav row with the cart and login shifts to the left because row is now 50% (see photo)

post-463404-0-16992700-1405871548_thumb.jpg

Edited by Whispar1 (see edit history)
Link to comment
Share on other sites

I took care of the logo size by changing global.css

#header_logo {
width: 33.33333%;

to

#header_logo {
width: 66.66667%;

This is an acceptable size visually for the logo. Just need to fix the nav row to the right. (see photo)

The other issue I see is in responsive (mobile) the category/logo is crowded... any ideas how to adjust this? (see photo)

post-463404-0-65411800-1405873396_thumb.jpg

post-463404-0-61729700-1405873424_thumb.jpg

Link to comment
Share on other sites

Thank you Vekia! I really appreciate it.

Can you clarify which instance of header .row I need to change (there are a lot of instances in global.css)

I am assuming it is line 5288

 header .row {
    position: relative; }

Do I leave the position as relative?

If I change header .row to 50%, it also shrinks the logo by 50% and also the nav row with the cart and login shifts to the left because row is now 50% (see photo)

 

don't alter any style, just add new instance of code for header .row

  • Like 1
Link to comment
Share on other sites

Post #6 shows what it is like so far and here it it live http://lux-puff.com/index.php

The only additional change I made was enlarge the logo because the 50% width made it too small.

#header_logo {
width: 66.66667%;

The banner is now also smaller and the cart/login is shifted to the left (because of float left)

Edited by Whispar1 (see edit history)
Link to comment
Share on other sites

Yes Vekia - the menu and the logo are as expected. However, because the cart and user_info also uses header.row, it is now shifted to the left. (see attachment #1) - It should be to the far right (see attachment #2)

 

The top banner also uses header.row so it has also shrunk to 50% size. You can see that although it stretches across the entire screen - it is 50% smaller (shorter)

post-463404-0-18936700-1406145116_thumb.jpg

post-463404-0-46582700-1406145160_thumb.jpg

Link to comment
Share on other sites

I figured it out - here is what I did.

 

Added .row2 to global.css

header .row {
    position: relative;
	/*width: 50%;
	float: left;*/ }
	
   /*Add .row2 to position menu next to logo*/	
	header .row2 {
    position: relative;
	width: 50%;
	float: left; }

Modified header.tpl as follows to reflect row2

<div class="row2">
								<div id="header_logo">
									<a href="{$base_dir}" title="{$shop_name|escape:'html':'UTF-8'}">
										<img class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}"{if isset($logo_image_width) && $logo_image_width} width="{$logo_image_width}"{/if}{if isset($logo_image_height) && $logo_image_height} height="{$logo_image_height}"{/if}/>
									</a>
								</div>
							</div>
                            <div class="row2">
                            {if isset($HOOK_TOP)}{$HOOK_TOP}{/if}
                            </div>

Because other elements use row, this was the only way to make sure the modifications only affect the row that holds the logo and menu. 

 

If anyone has an an idea how to add hash pipe separators as seen in attached image, please advise.

 

Thanks!

 

post-463404-0-64702000-1406565828_thumb.jpg

post-463404-0-26765400-1406566971_thumb.jpg

Edited by Whispar1 (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Yes Dioniz, I figured that was probably the best way to achieve this - thanks for the confirmation.

 

Okay so everything is looking okay but the tablet and mobile device screen look terrible (all jumbled up)

The menu wraps around into two lines on smaller screens and tablet/mobile looks a bit off.

Any thoughts on how to best clean this up?

Link to comment
Share on other sites

×
×
  • Create New...