Solved

Why won't this menu display correctly?

Posted on 2014-01-15
2
200 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
2 Comments
 
LVL 52

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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

713 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