WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • Fancy-box aspect-ratio not right!
  • Print
Pages: [1]   Go Down

Author Topic: Fancy-box aspect-ratio not right!  (Read 47959 times)

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Fancy-box aspect-ratio not right!
« on: November 17, 2014, 04:12:20 PM »
I'm having some trouble with fancy-box.
It's working fine but all images are not in the real aspect ratio when opened, how do I fix that?

I looked over on the forum, but couldn't find the answer to that.


Thank you very much.


R.
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Fancy-box aspect-ratio not right!
« Reply #1 on: November 17, 2014, 04:23:00 PM »
FancyBox is not a WebsiteBaker product, so technical help fot the script will be hard to get.

On the other hand. I have made many websites with FancyBox without problems. So it is not to be expected the problem lies in FancyBox itself but more probably in some css in your template.

For those kind of problems it will be impossible to help without being able to have a look at the problem.
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: Fancy-box aspect-ratio not right!
« Reply #2 on: November 17, 2014, 04:43:52 PM »
Thx for help It's my first time using FancyBox plugin.

Ok, I understand I have try to look for any css that could make this but have found nothing  :?

Here is the URL so you can see what happens when you click on image (small logos)
http://www.bi-center.eu/en/about-bic/

Thank you.

R.
Logged

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Fancy-box aspect-ratio not right!
« Reply #3 on: November 17, 2014, 05:09:12 PM »
Hi, first you should fix the js-errors.
Comment out the line
Code: [Select]
// register_frontend_modfiles('jquery') because you load jQuery below again.

Logged
https://onkel-franky.de

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Fancy-box aspect-ratio not right!
« Reply #4 on: November 17, 2014, 05:15:03 PM »
2 things..

1. you are loding jQuery more than once, causing other plugins to crash.

2. the fancybox script that is used is version 1.0.0 (2008). That might be not completely compatible with the modern bootstrap framework. Not sure what module you are using, but I would either try to upgrade the script/css or use another module/script

Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: Fancy-box aspect-ratio not right!
« Reply #5 on: November 18, 2014, 12:45:32 AM »
Thx for reply

I removed the
Code: [Select]
// register_frontend_modfiles('jquery')
Still the same..

@Ruud

What script do you prefer this was the only one I found, can you please point me to a better one maybe?

Thank you very much

R
Logged

instantflorian

  • Guest
Re: Fancy-box aspect-ratio not right!
« Reply #6 on: November 18, 2014, 06:59:14 AM »
Hi,

have a look at the colorbox snippet. Just install and give the image links the class "colorbox".

Impressive site btw.

BR
-f.
Logged

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: Fancy-box aspect-ratio not right!
« Reply #7 on: November 19, 2014, 05:36:31 PM »
Quote from: instantflorian on November 18, 2014, 06:59:14 AM
Hi,

have a look at the colorbox snippet. Just install and give the image links the class "colorbox".

Impressive site btw.

BR
-f.


Thx, I tried the colorbox you posted above, I installed, gave the image a class of colorbox, but it just opens in another window. I tried in image properties and manually it's not working. Do I have to put some code in my template like in fancybox or should this be working as is..?

Thank you, the site is still under construction, waiting for more content atm. Glad you like it.. ;)

Thank you

R
Logged

instantflorian

  • Guest
Re: Fancy-box aspect-ratio not right!
« Reply #8 on: November 19, 2014, 06:16:50 PM »
Hi,

possible reasons:
- Colorbox collides with Fancybox or one of the fantastillion other scripts which are loaded
- the colorbox script does not work with the jQuery version 1.11
- jquery is several times loaded (1st time in the head, 2nd time jQuery 1.7.1 where Fancybox is loaded)
Sad enough, but maybe it's better not to rely to the outdated and abandoned WB snippets like fancybox/colorbox in combination with bootstrap and all that other modern stuff. So I would remove colorbox and fancybox and call a timely lightbox script the same way like already CloudZoom, InstaFeed, JackBox, MixItUp etc. etc.

BR
-Florian.

Logged

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: Fancy-box aspect-ratio not right!
« Reply #9 on: November 21, 2014, 01:23:39 PM »
I have tried to remove all loaded jquery uninstalled colorbox and fancybox and tried to use some other script but can't get it to work at all, the only one that is working is fancybox but with aspect-ratio problem.

Out of ideas :(

thank you
R
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Fancy-box aspect-ratio not right!
« Reply #10 on: November 21, 2014, 01:53:28 PM »
This - very old - fancybox version will not work together with the bootstrap framework.

This rule in bootstrap.css:
Code: (bootstrap.min.css) [Select]
* {
    box-sizing: border-box;
}
will make all "older" lightbox scripts behave wrong. They are not able to calcuate the correct paddings/margins.

For testing, try adding in your style.css (loaded after bootstrap.min.css) on the first line:
Code: [Select]
* {
    box-sizing: content-box;
}
This will set the box-sizing to the default value defined in browsers.

You will notice the fancybox popups work fine now.
The bad part is the rest of the website will look bad (Bootstrap relies heavy on the "border-box" value.

For the rest..
Start using a tool like FireBug or the WebdDeveloper Toolbar in Firefox (or just F12 in most browsers) and look at the javascript errors on your site.
Right now, some jQuery scripts are loaded and called before jQuery is loaded. As long as there are errors in the (javascript) console your website will not work as it was intended to work!
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • Fancy-box aspect-ratio not right!
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2