Solved

Why won't this menu display correctly?

Posted on 2014-01-15
2
207 Views
Last Modified: 2014-01-16
Head out to http://www.brucegust.com/NHBC/mobile/about.php on your tablet.

You'll notice along the top, I've got a menu that you can sweep from left to right. Problem is, I can't figure out how to extend the scrollable area so it comes within 10px of the end.

Here's the portion of the stylesheet:

#scroll_bar {
height:27px;
width:1024px;
}

#makeMeScrollable div.scrollableArea *
{
      position: relative;
      display: block;
      float: left;
      margin-left: 5px;
      padding: 0;
      /* If you don't want the images in the scroller to be selectable, try the following
         block of code. It's just a nice feature that prevent the images from
         accidentally becoming selected/inverted when the user interacts with the scroller. */
      -webkit-user-select: none;
      -khtml-user-select: none;
      -moz-user-select: none;
      -o-user-select: none;
      user-select: none;
}


#scroll_caps
{
position:relative;
margin:auto;
width:950px;
height:27px;
}

#scroll_caps_left {
position:absolute;
left:3px;
width:17px;
height:27px;
background-image:url(images/left_arrow.png);
background-repeat:none;
}

#scroll_caps_right {
position:absolute;
right:3px;
width:17px;
height:27px;
background-image:url(images/right_arrow.png);
background-repeat:none;
}
      
#makeMeScrollable
{
margin-left:auto;
margin-right:auto;
height: 27px;
width:1000px;
}

...and here's the HTML:

<div id="scroll_container">
      <div id="scroll_caps_left"></div>
      <div id="scroll_caps_right"></div>
      <div id="scroll_caps">
            <div id="makeMeScrollable">
            <a href="index.php"><img src="images/link_home.png" border="0"/></a><a href="about.php"><img src="images/link_about.png" border="0"/></a><a href="visitors.php"><img src="images/link_guests.png" border="0"/></a><a href="ministries.php"><img src="images/link_programs.png" border="0"/></a><a href="children.php"><img src="images/link_children.png" border="0"><a href="https://www.google.com/calendar/embed?src=newnhbccalendar%40gmail.com&ctz=America/Chicago "><img src="images/link_calendar.png" border="0"/></a><a href="contact.php"><img src="images/link_contact.png" border="0"/></a></div>
      </div>
</div>

What do you think?
0
Comment
Question by:brucegust
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 53

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 39784512
Looks like setting these two to 420px works

#scroll_caps {
position: relative;
margin: auto;
width: 420px;
height: 27px;
}

#makeMeScrollable {
margin-left: auto;
margin-right: auto;
height: 27px;
width: 420px;
}

Open in new window

0
 

Author Closing Comment

by:brucegust
ID: 39785410
Thanks, Scott!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question