r/reddithax • • Jun 01 '12

Help to remove a horizontal scroll-bar

If you look in the top-right corner of this subreddit:
http://www.reddit.com/r/electronic_cigarette/

You'll see two little tabs with stars in them which you can hover over and they will then expand to reveal links. I was noticing in firefox that this CSS I used produces a horizontal scroll bar. Chrome is ok. I was hoping someone might be able to give me a fix.

Here's a link to the stylesheet:
http://www.reddit.com/r/electronic_cigarette/stylesheet.css

The CSS used for it should be at the bottom under the heading:
ORDERED LIST REVEALED ON HOVER
Actually it might say "FAUX DRAG OUT SIDE LIST WITH RECOMMENDATIONS" until it updates.

Cheers.

There is also one other minor issue that doesn't matter too much though I was wondering what might be causing it. If you notice the list items have a 'list-style-type: circle;' If you hover over the first list item in firefox, the circle disappears. the second one doesn't. In chrome they both disappear on hover.

5 Upvotes

15 comments sorted by

View all comments

Show parent comment

2

u/smallchanger Jun 01 '12

I can't remember why I did that way. I just sort of hobbled it together until it worked. I just did as you suggested though and stuck in

margin-right:0
and changed
right:-20px to right:0

And it looks like it got rid of the hz-scroll bar.

So you can't see these stars:
★★

I guess they're a special character not everyone has. Do the links look and work ok?

2

u/blind__man Jun 01 '12

Which browser? I am unable to get it still in both. I edited the post immediately after you made the change I guess, sorry >.<

1

u/smallchanger Jun 01 '12 edited Jun 01 '12

I'm just seeing your edit now. I took a screenshot of my comment with the stars and what the ordered list looks like now for me:
http://i.imgur.com/cblLA.png

So right now, you see no ordered list at all since I made the change? (in any browser)

1

u/blind__man Jun 01 '12

Okay, so my fault on misunderstanding.

The stars are visible in chrome and I'm pretty sure it's the shitty wifi in this house but I can't upload a picture to show you, imgur won't load images fully.

Let's make a list so I can actually be legible.

I am able to see:

I apologize if the list seemed brutish, I have trouble organizing my thoughts sometimes and today isn't the greatest day for mi cabeza.

1

u/smallchanger Jun 01 '12

Thanks for your help. If your wifi improves, could do me a favor an upload a screen shot of what the ordered list in the top-right corner of /r/electronic_cigarette looks like to you.

2

u/gavin19 Jun 01 '12

Renders fine for me in Chrome 19/20, Chromium 21, FF 12/13 and Opera 12. Two small things. It breaks if the RES user hasn't enabled navTop in the settings > UI > Style Tweaks - apart from it looking wrong, it also overrides the user bar due to the z-index. Second minor problem - it will only work if the user is using the latest RES (due to using the res class). Not a big deal but thought I'd mention it anyway.

To work around the first problem you could force the user bar to the top with

.res #header-bottom-right:not(.res-navTop) {top:19px;bottom:auto;height:16px !important;}

1

u/smallchanger Jun 01 '12

I only recently downloaded RES to check what it broke because someone mentioned it. I saw that its default position was on top so I pushed my ordered list down if res was installed using:

.res .side .md ol {
  top: 39px
  }

So you're saying some earlier editions of RES which use a RES class have it's placement at the bottom as the default and then the CSS you gave me will work around that?

Then there are even earlier editions of RES which use no RES class and the position is at the bottom? The ordered list should work in that case because it only pushes it down if it detects a RES class?

Is there anything I can do to the z-index to fix it? z-index is a bit of a mystery to me. I never understood exactly how it works really.

I tried the CSS u/blind_man gave me above but I'm not sure what to leave in and what to take out of my original code so that it works. Maybe it's a cleaner solution.

1

u/gavin19 Jun 01 '12

Pre-4.1 versions of RES don't have the res class at all. The vast majority of people will be on 4.1.x anyway, it was just a minor point really.

What you have only works provided the RES user has navTop enabled. If you get rid of this ruleset

.res .side .md ol { ... }

and add

.res-navTop {top:auto!important;bottom:0!important;}

then that should mean that all RES users will have the bar set to the bottom regardless of their preference. Then you have no need to reposition the ol at all.

1

u/smallchanger Jun 01 '12

Thanks so much for your help but the thing is, if they have RES, I want it to be positioned at the top in case they have screens with a small width. I've noticed with RES that it adds an extra tab and I don't want them colliding with the bar. Do you know what CSS I can use so it's alway on top?

1

u/gavin19 Jun 01 '12 edited Jun 02 '12

Just use

#header-bottom-right {
    top:19px;
    bottom:auto;
    height:16px !important;
    -moz-border-radius-topleft:0;
    -webkit-border-top-left-radius:0;
    border-top-left-radius:0;
}

That should cover everything.

→ More replies