Shape 5

Joomla Templates => Zoka Transports - Club => : kacper1972 January 14, 2015, 10:37:00 AM



: how to change the menu background and center background
: kacper1972 January 14, 2015, 10:37:00 AM
thank you for this great template

I want to make two changes, the first:
how to add a background in the menu when I'm using firebug writes color is:
# s5_nav {
     background: none repeat scroll 0 0 #fff;
     float: left;
     left: 50%;
     margin: auto;
     position: relative;
     width: auto! important;
}
but then the background shows up just over half the length, please see the image

secondly

I want to center a background image, but the option Background Image Position Option probably does not work. I changed the settings does not change anything.


: Re: how to change the menu background and center background
: jonahh January 14, 2015, 12:54:06 PM
Hello,

You can add a background to this:

#s5_nav li {

And then remove the margin-right:4px on this CSS definition too.  Other than this you can't get a background on the menu like you are trying to do because its centered with CSS and thats why its only showing on half of it.   The above method should do the same for you though

As for the background image can you post a URL of this?

Thanks,


: Re: how to change the menu background and center background
: kacper1972 January 14, 2015, 02:02:40 PM
Thank you :)

link

http://samm.idw.net.pl/

as you see, I need to center it and fit to window, it works in other positions, but no with main background



: Re: how to change the menu background and center background
: jonahh January 15, 2015, 02:16:55 PM
It looks like it just needs to have the "Background Image Position Option" set to center.  Then this should work.  "top center" specifically.


: Re: how to change the menu background and center background
: kacper1972 January 21, 2015, 10:44:16 AM
I tried different settings. Please look at the picture. More than this I installed a different template, and the situation is the same. Background does not set up for display.

I found another solution, if I choose a background for center_area_seting area as shown in the picture I have a background that sets up for the screen.

But the problem is that I have only half the screen with the background - an idea how to remove


: Re: how to change the menu background and center background
: mikenicoll January 22, 2015, 12:12:53 AM
Hello,

Your background call looks like this currently:

url("http://samm.idw.net.pl/images/background_homepage.jpg") no-repeat fixed 0 0 rgba(0, 0, 0, 0) !important

Try using center top as well as cover values in the coding above to help keep it in the middle and covering the entire page.


: Re: how to change the menu background and center background
: kacper1972 January 22, 2015, 12:46:17 PM
I found solution not good but for me ok.
I tray difrent setting in template options. in the end I made some change:

on line 91 I add this:
body style="background: url(images/background_homepage.jpg) no-repeat center center fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;"

and it works


: Re: how to change the menu background and center background
: mikenicoll January 23, 2015, 06:08:19 PM
Alright glad you got it sorted out.


: Re: how to change the menu background and center background
: enrutaco April 19, 2015, 10:46:30 PM
Hi,

What file did this user edit to change line 91 and add a background to main menu?

Elton


: Re: how to change the menu background and center background
: mikenicoll April 19, 2015, 10:54:28 PM
Hello,

His code doesn't line up to my site but most likely in the s5_flex_menu.css file. Generally I would suggest adding your custom code to the custom.css file for easier access later on though.


: Re: how to change the menu background and center background
: enrutaco April 27, 2015, 01:49:23 PM
How can I add an image as background for main menu then...? I mean, the right way using your site.


: Re: how to change the menu background and center background
: mikenicoll April 27, 2015, 06:14:11 PM
Hello,

The best way would be to add it to the entire header div.

:
#s5_header_wrap {background: url(images/background_homepage.jpg) no-repeat center center fixed;}

The menu bar is part of 2 elements so a background wouldn't look proper without custom programming it into a single <div> first in the index and applying the background to that <div>. That sort of change wouldn't be the easiest to accomplish without some PHP experience though.