Convert Menu to responsive

I inherited a section of a web site that is presented as fixed width. There are two pieces, I think I can manage all except a top menu by using % as widths rather than absolute pixels.

The "menu" part consists of a fixed image (attached) and an image map, as follows:

<map name="head">
      <area shape="rect" coords="611,21,783,38" href="http://www.rainrich.com/scheduling/index.php">
      <area shape="rect" coords="28,24,75,40" href="http://www.rainrich.com/home">
      <area shape="rect" coords="97,24,161,42" href="http://www.rainrich.com/services">
      <area shape="rect" coords="182,24,253,40" href="http://www.rainrich.com/about-us">
      <area shape="rect" coords="277,24,331,40" href="http://blog2.rainrich.com">
      <area shape="rect" coords="352,24,482,40" href="http://www.rainrich.com/online-payments">
      <area shape="rect" coords="502,24,590,40" href="http://www.rainrich.com/contact-form">
</map>      

and:
<img src="images/header.png" width="909" height="159" usemap="#head" border="0">

I don't need to EXACTLY replicate the image, I could probably just have a green background & the menu items listed horizontally.

What is the quickest & easiest was to make the menu portion responsive, meaning will display proportionally on smart phones & tablets?

Thanks
header.png
Richard KortsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RobOwner (Aidellio)Commented:
You won't be able to use the image map because a it scales down the coordinates won't be correct.
I'd add a second responsive menu that only appears below a certain resolution, i.e.the width of the image. If the screen is wider, site the image map, smaller, then show the new responsive menu.
You can do that with css media queries
So assuming you have a div to encapsulate your original menu, with a class "menu1" and your new responsive menu has the class "menu-responsive"
@media screen (min-width: 909px) {
    div.menu1 {
        display: block;
    }
    div.menu-responsive {
        display: none;
    }
}
@media screen (max-width: 908px) {
    div.menu1 {
        display: none;
    }
    div.menu-responsive {
        display: block;
    }
}

Open in new window


<div class="menu 1">
<map>...</map>
<img ... />
</div>
<div class="menu-responsive">
<ul>
<li>...</li>
...
</ul>
</div>

Open in new window

0
Richard KortsAuthor Commented:
Thanks, I think I did what you said, must have done something wrong.

If shows both menus (on a normal PC screen).

See http://rkassoc.org/Rainrich/menu_test.html.

html attached.

Thanks
menu-test.html
0
Richard KortsAuthor Commented:
To Rob Jurd

I attached the wrong version, I fixed it, still the same.

See attached
menu-test.html
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

RobOwner (Aidellio)Commented:
Sorry, I forgot the "and" in the media query

@media screen and (max-width: ...)

@media screen and (min-width: 909px) {
    div.menu1 {
        display: block;
    }
    div.menu-responsive {
        display: none;
    }
}
@media screen and (max-width: 908px) {
    div.menu1 {
        display: none;
    }
    div.menu-responsive {
        display: block;
    }
}

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Richard KortsAuthor Commented:
Thanks, I actually solved that another way but it's good to see that it works.

I have another css related question for EE coming shortly.
0
RobOwner (Aidellio)Commented:
That's good to hear and thanks for the points.  How did you end up doing it?
0
Richard KortsAuthor Commented:
I am now trying to use the @media, it fails and oddly actually does the opposite of what I want.

See this question: http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/CSS/Q_28678469.html

Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.