Размеры блока с комментариями Google

More
7 years 11 months ago - 7 years 11 months ago #6589 by Павел
Здравствуйте, уважаемые разработчики!

Эта тема в продолжении темы " Ширина блока с комментариями Google ". Так как Вы там перестали мне отвечать я решил сознать новую тему.

У меня есть радостная новость: я все-таки понял как можно растянуть блок с комментариями Google по ширине страницы и чтобы он менялся в зависимости от размеров окна браузера. Для этого было необходимо чуть-чуть подкорректировать файл "jlcomments.php".

Тем не менее у меня осталось 2 вопроса:
  • С шириной-то я разобрался а вот с высотой нет: комментарии выводятся при помощи Iframe который помещается в блок и в момент когда этот Iframe появляется высота этого блока становится 600px а это бывает очень некрасиво так как по-хорошему там должно быть максимум 270px. Я все облазил но так и не нашел как можно повлиять на этот Iframe чтобы он не увеличивал высоту этого блока. Подскажите пожалуйста какими способами можно это сделать?
  • Интересный момент с шириной блока с комментариями: блок в который вставляется Iframe в свою очередь находится в блоке "googlecomm" и если в файле "jlcomments.php" прописать ширину для "googlecomm" 100% а ширину блока в котором находится Iframe задать конкретную которая будет меньше ширины страницы то при загрузке страницы сначала блок с комментариями будет шириной которую я задал но если повертеть мышкой на этом блоке то он растянется на всю ширину. Скажите пожалуйста почему так происходит?

Заранее спасибо!
Last edit: 7 years 11 months ago by Павел.

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago - 7 years 11 months ago #6605 by JoomLine
Дело в том, что мы не знаем изначальную высоту блока фрейма... она в момент загрузки составляет 0 пикселей, и уже потом фрейм принимает другие размеры.
Last edit: 7 years 11 months ago by JoomLine.

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago - 7 years 11 months ago #6608 by Павел
Last edit: 7 years 11 months ago by Павел.

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #6610 by Павел
А возможно ли повлиять на действия фрейма? Какие у этой функции есть передаваемые параметры кроме тех 4-х которые Вы указали? Возможно ли указать минимальную высоту?

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #6612 by JoomLine
#googlecomm * {
min-height: 270px !important;
}

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #6613 by Павел
Это к сожалению не помогает: при загрузке страницы сначала высота действительно становится меньше но буквально через пару секунд блок увеличивается то 600 px. Есть ещё варианты?

Если нет то подскажите пожалуйста как можно увеличить высоту блоков с другими виджетами? А то при переключении вкладок прыгает страница и это не очень приятно для посетителей сайта.

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #6615 by JoomLine
гхм... посмотрел, размер виджета гугл уже минимум 600 пикселей.

если все остальные сделать минимум 600, то будет так.

#googlecomm *, #jlcomments*, #fbcomm* , #vkcomm* {min-height:600px !important;}

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #6616 by Павел
Хорошо, проверю.

На счёт высоты виджета Google: да, изначально у Вас размер этого блока стоит 600. Это наверное сделано специально чтобы "не прыгала" страница. А вот если это значение уменьшить то будет именно так как я говорю: сначала у блока будет заданная нами высота но через несколько секунд она увеличится.

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #6618 by Павел
Да, и еще вопрос: почему при переключении на вкладку VK виджет этих комментариев появляется с задержкой? Все остальные видны сразу а этот нет.

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #6621 by JoomLine
Это связано с принципом загрузки виджета, он начинает грузиться, когда блок с ним виден.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum

Last from the forum

    • One day, a curious boy named Sam move
    • One day, a curious boy named Sam moved into the house with his family. As he explored the property, he noticed a rusty, old key lying under a bush. Sam picked it up, wondering what it might unlock. After searching the house and finding nothing, Sam decided to try the key on the garden gate. To his surprise, the key fit perfectly. With a turn of the key and a creak of the hinges, the gate slowly swung open. Inside the garden, Sam was greeted by a sight of wonder. The garden was overgrown but full of vibrant flowers, exotic plants, and a small, sparkling pond. In the middle of the garden stood a beautiful stone statue of a unicorn. As Sam explored further, he discovered a small plaque next to the statue. It read: "To whoever finds this garden, may you always find joy in the beauty of nature and the magic of discovery." Sam spent hours in the garden, exploring every corner and marveling at the hidden beauty. The garden seemed to have a magical quality that made Sam feel at peace and incredibly happy. From that day on, Sam made it a habit to visit the garden every day, taking care of it and sharing its beauty with his friends and family. The once-forgotten garden became a place of joy and wonder for everyone who visited. And so, Sam learned that sometimes, the greatest treasures are not just the secrets we uncover but the beauty and joy we find in them.
    • In Component / Afisha Joomla
    • how much money does a sponsor give
    • One day, a monkey drove his car near a lake. Sudden, he saw a tiger under a tree. The tiger saw him, too. The tiger ran very fast at the monkey. The monkey was very afraid and he and his car fell into the lake. The monkey couldn't swim and he shouted. A rabbit came and he jumped into the lake. The abbit swam to the monkey but did not help him. Both of them shouted forhelp. Luckily, a giraffe came along. He was very tall. He helped the rabbit and the monkey.  
    • In Component / JL TV
    • virtual phone
    • One day, a monkey drove his car near a lake. Sudden, he saw a tiger under a tree. The tiger saw him, too. The tiger ran very fast at the monkey. The monkey was very afraid and he and his car fell into the lake. The monkey couldn't swim and he shouted. A rabbit came and he jumped into the lake. The abbit swam to the monkey but did not help him. Both of them shouted forhelp. Luckily, a giraffe came along. He was very tall. He helped the rabbit and the monkey.  
    • In Component / JL TV
© 2010- JoomLine
The Joomla!® name is used under a limited license from Open Source Matters in the United States and other countries. joomline.net is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.

email: This email address is being protected from spambots. You need JavaScript enabled to view it.