Solved

Why won't this menu display correctly?

Posted on 2014-01-15
2
196 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Remove lines by logo 2 29
Change of column alignment in div 2 18
Place text over image using CSS 6 43
Center div containing a script 6 14
Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
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.…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

786 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