Jump to content

100% Width Header And Footer


Recommended Posts

Hello,

I am using the default PrestaShop theme to develop a theme from the ground up and I'm already somewhat stuck.

I want to make a 100% width header and footer in a similar style to the header here: http://prestastyle.com/prestashop/theme1/ and here http://www.headict.com/

The basic idea is to keep the three columns beneath at the desired width and in a different colour whilst having a bold 100% width header. I'm played around with global.css for a little while and made no progress.
Any ideas, my friends?

Thanks,

Stuart

Link to comment
Share on other sites

  • 1 month later...
http://prestastyle.com/prestashop/theme1/

global.css

html {
background: url(../img/bgMain.png);
}
body {
font: normal .81em/1.6em Trebuchet MS, Helvetica, sans-serif;
width: 100%;
margin: 0 auto;
color: #000;
}
#pageWrapper{
background: url(../img/bgTop.png) repeat-x;
width:100%;
height:100%;

/* global layout */
#pageWrapper{
background: url(../img/bgTop.png) repeat-x;
width:100%;
height:100%;
}
#page {
width: 980px;
margin: 0 auto;
}
Link to comment
Share on other sites

  • 2 years later...
  • 1 month later...

for header:

 

#page - add width: 100%;

#header - add width: 100%;

 

you can add this in style="" tags (header.tpl) for div blocks that I mentioned above. You can also change values for grid system:

 

grid_prestashop.css

.container_9 .grid_9 {
width: 100%;
}


.container_9 {
margin: 0 auto;
width: 100%;
}

Link to comment
Share on other sites

  • 1 month later...

PS1.5, creating new theme, based on default theme files.

 

OK, guys. I got header and footer width100%, I will share, but I faced new issues and hope you could help.

 

In the beginning I tried what vekia said, but it didn't help in my case.

Then thanks to the link in post #5 by ajensen27 (which totally worked for Footer), I figured out what to do in header:

 

header.tpl

 

1. Just before the comment <!-- Header --> arond line 74, before that comment insert

<div id="page" class="container_9 clearfix" style="width: 100%;">

2. Then after the <!-- Header -->, in the <div id="header" line add style so it looks like that:

<div id="header" class="grid_9 alpha omega" style="width: 100%; clear:both; display:block; overflow:hidden;">

3. The very next line after previous, add next code:

<div style="width: 980px; display:block; margin:auto; clear:both;">

4. Around line 86-88 there should be a new <div id="columns" line , so right after that line add next code:

<div style="width: 980px; display:block; margin:auto; clear:both;">

 

Now you have to have your header and footer 100% wide and all the columns in the center with 980px width.

 

And now, I have next problem - it's the Authentication page (Login) and Your shopping car / checkout pages. They don't want ot be in the center. http://artemida.jp/en/authentication?back=my-account

It looks like they are independent from columns. I tried messing around with authentication.tpl file to do something similar like in header.tpl, but no luck so far.

 

Help?

Link to comment
Share on other sites

cut <div id="page" class="container_9 clearfix">

and paste it below

<div id="header_right" class="grid_9 omega">

{$HOOK_TOP}

</div>

</div>

 

<!--here-->

<div id="columns" class="grid_9 alpha omega clearfix">

 

 

 

it will be like this

 

<!-- Header -->

<div id="header" class="grid_9 alpha omega">

<a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}">

<img class="logo" src="{$logo_url}" alt="{$shop_name|escape:'htmlall':'UTF-8'}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}" {/if} />

</a>

<div id="header_right" class="grid_9 omega">

{$HOOK_TOP}

</div>

</div>

<div id="page" class="container_9 clearfix">

<div id="columns" class="grid_9 alpha omega clearfix">

<!-- Left -->

<div id="left_column" class="column grid_2 alpha">

{$HOOK_LEFT_COLUMN}

</div>

 

<!-- Center -->

<div id="center_column" class=" grid_5">

{/if}

 

then changed #header: width{100%; background:#any;}

Link to comment
Share on other sites

jitenx, thanks for the help, man, but after I copy-replaced my code with what you wrote above - my header elements, top menu and columns messed up. When I checked login page - login forms were perfectly where it is supposed to be in the center, but now other things were not in the place.

So I reckon the solution for me is somewhere in between those lines, I just need to keep experimenting with different combinations of placing certain strings....

Link to comment
Share on other sites

just changed default to this out of prestashop division

 

<!-- Header -->

<div id="tempheadr" class="grid_9 alpha omega">

<div class="head-inner">

<div class="inne-wrapper">

<a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}">

<img class="logo" src="{$logo_url}" alt="{$shop_name|escape:'htmlall':'UTF-8'}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height} height="{$logo_image_height}" {/if} />

</a>

<div id="header_right" class="grid_6 omega">

{$HOOK_TOP}

</div>

{include file="$tpl_dir./breadcrumb.tpl"}

</div>

</div>

</div><!-- end-header -->

#tempheader {background:#000;} at global

.omega {width:100%} at gird

Link to comment
Share on other sites

  • 1 month later...

Hi all,

I found a partial solution about this "issue" with 100% width header.

 

Make Your own header graphics with 1920px width and desired height (You can also make a menu background with whis way!)

Here is demo header http://kisweb.pl/pli...stashop/try.jpg

 

In global.css file of default prestashop theme just add in body

background: #fff url(../img/try.jpg) no-repeat center top;

 

In modules/blocktopmenu/css edit superfish-modified.css

and remove background: #383838; in .sf-menu class (line ~15 at 1.5.4.1)

You may also need to position menu label then use .sf-contener class and add margin-top: 105px; to position menu in vertical position in case of use of my try.jpg header file

 

For me works perfect :)

 

http://kisweb.pl/pliki/prestashop/result.jpg

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

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...