Jump to content

Top horizontal menu width 100%


Recommended Posts

if you're on default theme use this:

 

to global.css append this code:
 

  #header .headerbg {
    background:url('http://i.imgur.com/98h2maZ.png') top repeat-x;
  }

then in header.tpl file search for code:
 

<header id="header">
					<div class="banner">
						<div class="container">
							<div class="row">
								{hook h="displayBanner"}
							</div>
						</div>
					</div>
					<div class="nav">
						<div class="container">
							<div class="row">
								<nav>{hook h="displayNav"}</nav>
							</div>
						</div>
					</div>
					<div>
						<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>
					</div>
				</header>

and change it to:

<header id="header">
					<div class="banner">
						<div class="container">
							<div class="row">
								{hook h="displayBanner"}
							</div>
						</div>
					</div>
					<div class="nav">
						<div class="container">
							<div class="row">
								<nav>{hook h="displayNav"}</nav>
							</div>
						</div>
					</div>
					<div class="headerbg">
						<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>
					</div>
				</header>

(i added class="headerbg" to last main <div> block)

 

 

effects:
wWRF1lj.png

Link to comment
Share on other sites

Could you look on my website ?  

 

Try to change the size of your browser then you should notice that everything is crashing. 

I'm not sure what to do with that. 

 

http://weeding-cars.pl/index.php
 

 

Ok , I know what is wrong. 

 

Menu bar is changing automatically after resizing the browser and that is why my background is crashing.
Is there any easy solution  ? :)   

 

menu%232.jpg

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

  • 1 month later...
Bonjour,

N'y a t'il pas un moyen en modifiant simplement la largeur ou noms des div du header tpl(au lieu d'insérer une image)? cela permettrait d'être responsive.

 

Merci

Julien

 


Hi,

Is there no there not a way simply by changing the width or names of the header div dwt (instead of inserting an image)? this would be responsive.

 

thank you

Julien

Link to comment
Share on other sites

  • 2 weeks later...

if you're on default theme use this:

 

to global.css append this code:

 

  #header .headerbg {
    background:url('http://i.imgur.com/98h2maZ.png') top repeat-x;
  }

then in header.tpl file search for code:

 

<header id="header">
					<div class="banner">
						<div class="container">
							<div class="row">
								{hook h="displayBanner"}
							</div>
						</div>
					</div>
					<div class="nav">
						<div class="container">
							<div class="row">
								<nav>{hook h="displayNav"}</nav>
							</div>
						</div>
					</div>
					<div>
						<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>
					</div>
				</header>
and change it to:

<header id="header">
					<div class="banner">
						<div class="container">
							<div class="row">
								{hook h="displayBanner"}
							</div>
						</div>
					</div>
					<div class="nav">
						<div class="container">
							<div class="row">
								<nav>{hook h="displayNav"}</nav>
							</div>
						</div>
					</div>
					<div class="headerbg">
						<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>
					</div>
				</header>
(i added class="headerbg" to last main <div> block)

 

 

effects:

wWRF1lj.png

 

Hello all,

 

I want to change similarly Top horizontal menu width to 100% but after the changes described in the two documents (global.css and header.tpl) the result unfortunately is not similar to the picture presented. 

 

 I use PS 1.6.0.8 and the theme is bootstrap (and banner block is disable).

 

Attached find the store image resulting from the changes.

 

Thanks in advance for your help. 
 
Vali.
Link to comment
Share on other sites

×
×
  • Create New...