17 replies [Last post]
transoptic
Offline
newbie
Last seen: 10 years 5 weeks ago
Timezone: GMT-5
Joined: 2010-09-18
Posts: 9
Points: 10

I can't for the life of me center the text of the submenus, even with text-align: center.
I suspect it has something to do with float: left, but I'm at a loss for a workaround.

Any help would relieve many headaches.

#nav
{
	clear: left;
	margin: 0 0 0 5;
}
 
 
#nav ul 
{
    list-style: none;
    padding: 0;
    display: inline;
}
 
 
#nav li {float: left;}
 
 
#nav li a {
	color: #3e3838;
	text-decoration: none;
	text-transform: uppercase;
	font-size: 13px;
	border: none;
	margin: 0 75px 0 0;
	font-family: Bank Gothic, Gill Sans,  Helvetica, sans-serif;
	position: relative;
	}
 
 
#nav a:hover
       {
	color: #9a7842;
   	}
 
 
#nav li ul {
  display: none;
  position: absolute; 
  top: 7em;
  left: 15px;
  height: 16px;
  background-color: #fff;	
  }
 
 
 
#nav li li {width: 125px;
            text-align: center;
	    border-right: 1px solid #1a606f;
	    border-left: 1px solid #1a606f;}

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 6 years 1 week ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Have you tried #nav li li {

Have you tried #nav li li { float:none} ?

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

transoptic
Offline
newbie
Last seen: 10 years 5 weeks ago
Timezone: GMT-5
Joined: 2010-09-18
Posts: 9
Points: 10

Tyssen, thanks for the reply,

Tyssen, thanks for the reply, but that makes the submenu vertical dropdown, and it still doesn't align text.

The idea is to have a horizontal menu with horizontal submenus directly below, with text aligned centrally between left and right borders.

Such as:

Menu Item 1           Menu Item 2             Menu Item 3
    |  Sub Item 1  |  Sub Item 2  |  Sub Item 3  |

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 6 years 1 week ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Got a link?

Got a link?

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

transoptic
Offline
newbie
Last seen: 10 years 5 weeks ago
Timezone: GMT-5
Joined: 2010-09-18
Posts: 9
Points: 10

http://www.justingillphoto.co

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 6 years 1 week ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

You need to reset the large

You need to reset the large right margin from the parent <li>s of the submenus.

Also, on an unrelated note, don't use title attributes if they say exactly the same thing as the anchor text. The title attribute is to provide additional information that is not conveyed by the anchor text, so having the same thing in two places is redundant.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

transoptic
Offline
newbie
Last seen: 10 years 5 weeks ago
Timezone: GMT-5
Joined: 2010-09-18
Posts: 9
Points: 10

Ah yes, the issue was to

Ah yes, the issue was to place the right margin in #nav li not #nav li a

And you're right, that was redundant; the links were originally images converted in favor of the dropdown style.

Lastly, is it at all possible for you to discover why the horizontal jscrollpane isn't showing at the bottom of the #gallery div?
I don't think it's a scripting problem so much as a stylesheet issue.

THANKS!

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 6 years 1 week ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

You need overflow:scroll on

You need overflow:scroll on #gallery .scroll-pane.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

transoptic
Offline
newbie
Last seen: 10 years 5 weeks ago
Timezone: GMT-5
Joined: 2010-09-18
Posts: 9
Points: 10

while I appreciate your

while I appreciate your prompt help, that doesn't seem to do it.

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 6 years 1 week ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Well if the aim was to

Well if the aim was to produce a horizontal scrollbar so you can see the rest of the images, then it works fine at my end. If that's not what was intended, then you need to explain what was.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

transoptic
Offline
newbie
Last seen: 10 years 5 weeks ago
Timezone: GMT-5
Joined: 2010-09-18
Posts: 9
Points: 10

You know, it occurs online,

You know, it occurs online, but not offline locally.

Even still, the scroll is intended to be stylized by jscroll.css
All I see (in FF) is the default scrollbar.

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 6 years 1 week ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Impossible for me to

Impossible for me to troubleshoot because in order to use Firebug I have to turn off js to disable your prevent right clicking script, but obviously with js turned off, your scroller's not going to work.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

transoptic
Offline
newbie
Last seen: 10 years 5 weeks ago
Timezone: GMT-5
Joined: 2010-09-18
Posts: 9
Points: 10

I apologize, I forgot that

I apologize, I forgot that was in there (to protect my photos)

Disabled.

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 6 years 1 week ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Check your path to

Check your path to jscrollpane.min.js; it produces a 404.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

transoptic
Offline
newbie
Last seen: 10 years 5 weeks ago
Timezone: GMT-5
Joined: 2010-09-18
Posts: 9
Points: 10

fixed. Sorry, and thanks

fixed.

Sorry, and thanks again

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 6 years 1 week ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Have you got Firebug

Have you got Firebug installed? If not, you should as you could've troubleshot the last two points yourself. It's now saying $(".scroll-pane").jScrollPane is not a function so I'd check that the script you're using is in fact compatible with jquery 1.4.2.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 6 years 1 week ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Although, having said that,

Although, having said that, the js scrollbar does now appear to be working.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

transoptic
Offline
newbie
Last seen: 10 years 5 weeks ago
Timezone: GMT-5
Joined: 2010-09-18
Posts: 9
Points: 10

No, I'm not a developer. I

No, I'm not a developer. I update my website about once every two years.

It should work as far as I know, I got it from here: http://jscrollpane.kelvinluck.com/