WordPress.org

Ready to get started?Download WordPress

Forums

Annarita
[resolved] How to change the nav main menu? (13 posts)

  1. Fabinigames
    Member
    Posted 1 year ago #

    Hi all!
    I' m trying to modify the navigation menu on header (The blue bar with Home...) and put a backround image to personalize.
    Really i don't know why! But when i tryto define a background on stylesheet.css in the nav.main-menu line 308 adding the background: url ('imageurl.format'); i can t see the background.
    If anyone can help, my website is http://www.reinosdeathavia.net

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    background: url ('imageurl.format');

    That code does not look correct - see:

    http://www.w3schools.com/css/css_background.asp

  3. indybook
    Member
    Posted 1 year ago #

    Hi!

    try
    background: url('images/my_background.png ');

    where 'images' is the folder sharing the same folder as your style.css file
    and my_background.png is the image (change png for gif or jpeg or what you have )

  4. Fabinigames
    Member
    Posted 1 year ago #

    Hi!
    We put the code correctly, but look like if any choose don t let the image been show.
    we has changed the code like in the tutorial, and is the same... don ' t works...

    nav.main-menu
    {
       background-image: url ('http://www.reinosdeathavia.net/wp-content/themes/annarita/images/barra.png');
       margin: 2px 2px;
       float: left;
       width: 100%;
    }

    The image is a bar.. u can see it: http://www.reinosdeathavia.net/modifycss/barra.png

    Please help we are working for few days and we can t solve this.. lol
    thanks a lot!

  5. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Try using "background" not "background-image" :

    nav.main-menu
    {
       background: url('http://www.reinosdeathavia.net/wp-content/themes/annarita/images/barra.gif');
       margin: 2px 2px;
       float: left;
       width: 100%;
    }

    You also have some other CSS errors:
    http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.reinosdeathavia.net%2F&profile=css3&usermedium=all&warning=1&vextwarning=&lang=en

  6. Fabinigames
    Member
    Posted 1 year ago #

    I' ve not modified the CSS only the lane to add a background. Is this template useless? If u see, first time we tryed to do with "background:" comand.. i think somethink that don t let the image been wievied...

  7. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Where are you adding that code to? You ARE modifying CSS if you are adding a background. Did you try the code I posted above?

  8. Fabinigames
    Member
    Posted 1 year ago #

    i' m adding this code to change the bar background, to see my own image. i'm modifyng CSS but i think there is a code that is priorized than this. I tryed your code and nothing.

  9. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    You really should not be changing CSS in the theme file - your changes will be lost when the theme is updated. Instead you should be using a custom CSS plugin or a child theme.

    But I see the same code in your stylesheet - this line is wrong:

    background-image: url ('http://www.reinosdeathavia.net/wp-content/themes/annarita/images/barra.gif');

    It should be this:

    background: url('http://www.reinosdeathavia.net/wp-content/themes/annarita/images/barra.gif');

    Look on line 309 in your style.css file.

    I just tested it in Firebug and the corrected version works fine.

  10. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Make sure you are clearing any caches after making any changes.

  11. Fabinigames
    Member
    Posted 1 year ago #

    WPyogi are u god? I love u! Really XDDDD

  12. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    LOL - no, not god! But thank you and you're welcome.

  13. dlnsparks
    Member
    Posted 1 year ago #

    I also have a question regarding the Main Menu bar. Is there a way to "center" it & not leave a blank "bar" on my menu?

    My website is: http://sgt-christoff-golf-tournament.com/

    Thank you.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic