[email protected] Posted September 25, 2014 Share Posted September 25, 2014 Hello, I am using PS 1.6.0.9 and I am trying to make topbanner and the row below (se attchement) to be fixed. I cant get it to work can any one help me with this. I will somethims remove the topbanner and then the contact info, currency changer, login row should be fixed. The link to the site is www.divelife.se . I hope you dont see this a comercial. The site is in non working phase and right now for test purposes. Thank you for your help. /Tor Link to comment Share on other sites More sharing options...
vekia Posted September 25, 2014 Share Posted September 25, 2014 try to use these css styles: .banner {position:fixed; top:0px; width:100%;} .nav {position:fixed; top:65px; width:100%;} #page {margin-top:100px;} Link to comment Share on other sites More sharing options...
vekia Posted September 25, 2014 Share Posted September 25, 2014 you will need to deal also with z-index probably i never tried it but it should work :-) Link to comment Share on other sites More sharing options...
[email protected] Posted September 25, 2014 Author Share Posted September 25, 2014 Hello, Thank you Vekia for quick response. I guess you are meaning to do the changes in global.css Link to comment Share on other sites More sharing options...
sooroos Posted September 25, 2014 Share Posted September 25, 2014 or simply use this class: navbar-fixed-top Link to comment Share on other sites More sharing options...
vekia Posted September 25, 2014 Share Posted September 25, 2014 for what element? header is a wierdy constructed i think Link to comment Share on other sites More sharing options...
[email protected] Posted September 25, 2014 Author Share Posted September 25, 2014 Hello, I tried and the result was not 100% correct . If you go into the website you can se. Since you are like 10000000 times more skilled than me you can probably se what I have done wrong. This is what I have done. All the changes are in global.css. line 6666. #page .rte { margin-top:100px; background: transparent none repeat scroll 0 0; } line 5269. header { z-index: 1; position: relative; background: white; padding-bottom: 15px; } header .banner { position:fixed; top:0px; width:100%; background: black; max-height: 100%; } header .banner .row { margin: 0px; } header .nav { background: #000; position:fixed; top:65px; width:100% } header .nav .row { margin: 0px; } header .nav nav { width: 100%; } header .row { position: relative; } header .row > .container { position: relative; } header .row #header_logo { padding-top: 15px; } Link to comment Share on other sites More sharing options...
sooroos Posted September 25, 2014 Share Posted September 25, 2014 add z-index to header .nav like z-index:8888 and also to header .banner than edit padding-top values for: header .row #header_logo set it to 150px #search_block_top also padding-top: 150px #header .shopping_cart also padding-top: 150px u use minified CSS so i cant exactly tell you the lines and files to edit Link to comment Share on other sites More sharing options...
[email protected] Posted September 25, 2014 Author Share Posted September 25, 2014 Hi, I have removed minified css and my only problem is that I can't find #header .shopping_cart any idea where to look. Link to comment Share on other sites More sharing options...
[email protected] Posted September 26, 2014 Author Share Posted September 26, 2014 Thank you Sooros and Vekia for your help. I found the #header.shoping_cart. My next question is. Is there any way to do this without using fixed positions. When I change the top banner I don't want to go into the css files every time to change the positions. Sometimes I don't use the top banner and sometimes its maybe 70px in length and so on. I hope you understand what I mean. If you go in now you can se /Tor Link to comment Share on other sites More sharing options...
vekia Posted September 27, 2014 Share Posted September 27, 2014 sadly it's not possible, it can be done only with css, and fixed position can be defined only with css Link to comment Share on other sites More sharing options...
unplugged1983 Posted February 15, 2015 Share Posted February 15, 2015 Hi All THanks for the help. with use of your code and a bit of tweeking i managed to get the top banner to stay at the top of the pages while scrolling down. DETAILS as follows: CSS: global.css of bootstrap theme folder at the HEADER .banner add: position:fixed; top:0px; width:100%; and at the HEADER .nav add: margin-top: 65px; CODE: header { z-index: 1; position: relative; background: white; padding-bottom: 15px; } header .banner { background: black; max-height: 100%; position:fixed; top:0px; width:100%; } header .banner .row { margin: 0px; } header .nav { background: #333333; margin-top: 65px;} header .nav .row { margin: 0px; } header .nav nav { width: 100%; } TPL: header.tpl of bootstrap theme folder at the div class="header-container" move the div class="banner" under the div class=nav AND the div class "container" CODE: <div class="header-container"> <header id="header"> FROM HERE ----> <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> TO HERE -> <div class="banner"> <div class="container"> <div class="row"> {hook h="displayBanner"} </div> </div> </div> </header> </div> Hope this helps and thansk heeeps My site is www.wattc.com.au Dan 1 Link to comment Share on other sites More sharing options...
faublak Posted February 18, 2015 Share Posted February 18, 2015 try to use these css styles: .banner {position:fixed; top:0px; width:100%;} .nav {position:fixed; top:65px; width:100%;} #page {margin-top:100px;} Hi vekia, it works, but the page and logo up to the top page above the header instead of below the header. Link to comment Share on other sites More sharing options...
faublak Posted February 18, 2015 Share Posted February 18, 2015 Hi vekia, it works, but the page and logo up to the top page above the header instead of below the header. I solve it with z-index: 8888;. But the problem it's the logo its below the hader its'n possible to see. Anyone knows how sove it? Thanks Link to comment Share on other sites More sharing options...
Recommended Posts