0

I have following issue:

When you load the page everything is ok, but whenever you click on the button "Вчера"

.custom-container get's margin from the left. It moving to the right by 7 pixels. If you click back on "Сегодня" then you'll see it's back to its original position.

Here's link for my website: http://2news.kz

Looking for help, thanks in advance.

UPDATE

Issue is in .custom-container row's, but still can't figure out.

Alexander Kim
  • 17,304
  • 23
  • 100
  • 157

1 Answers1

1

Your text "Выбрать дату" Changes to "Invalid date" on menu. So menu changes width and moves.

You can fix it, or set constant width to #customButton

Edit:
Other than that, your page is short and when you click on that element it extends in height. Making your right scrollbar visible then, So the page jumps a bit to left.

Solution to this is to always enable scroll. Making the main scrollbar always visible

Community
  • 1
  • 1
Grzegorz
  • 3,538
  • 4
  • 29
  • 47
  • Thanks, but that's not a culprit, i've tried to set the width of `#customButton` to `150px` but it behaves the same. – Alexander Kim Dec 03 '14 at 10:32
  • That's the only thing, that moves elements after clicking "Вчера" button. Setting it to 150px width works fine for me. It does not move, although text changes of this button. To test it, use "style" element. – Grzegorz Dec 03 '14 at 10:57
  • you have the `div` those 3 elements are in set to center, so when the width of any one of them changes (date field in particular), all 3 elements will move to compensate. – Claies Dec 03 '14 at 11:00
  • @Gacek, i have set it using the style attribute to 150px and my container is still jumping, i am testing that in Firefox 34/Chrome 39. @AndrewCounts, i've tried to remove `text-align:center` and that's not the issue... – Alexander Kim Dec 03 '14 at 11:07
  • Aaaa.. Container, I thought you meant menu. Just about to edit, to give you solution then. – Grzegorz Dec 03 '14 at 21:09
  • Lol, indeed. But is there any other ways except enabling scroll all the time? Is there any more elegant solution? – Alexander Kim Dec 04 '14 at 08:38
  • Dont think so. Making site always at last 1 px higher than browser window. But effect is same. – Grzegorz Dec 04 '14 at 10:03