How can i change background color??

260 views
Skip to first unread message

streetoffice

unread,
May 11, 2012, 9:17:10 AM5/11/12
to fanc...@googlegroups.com
How can i change background color (color overlay?) i tried this 

$(".fancybox").fancybox({
'overlayColor': '#ffffff'

});

but it doesn,t work!!

streetoffice

unread,
May 11, 2012, 9:28:41 AM5/11/12
to fanc...@googlegroups.com
Ok i changed this:

#fancybox-overlay {
position: absolute;
top: 0;
left: 0;
overflow: hidden;
display: none;
z-index: 8010;
background: #ffffff;     < i changed this line >
}

Fred Riley

unread,
May 23, 2012, 8:59:00 AM5/23/12
to fancybox
I'm having the same problem when trying to change the overlay colour
for inline content. It's not a big deal as, like yourself, I could
change the inline <div> background colour, but I would like to know
why overlayColor isn't working. Or if it is, am I misunderstanding the
term 'overlay'?

Nice plugin, with very good documentation. Thanks for making it
available :)

Cheers

Fred

JFK

unread,
May 23, 2012, 3:20:34 PM5/23/12
to fancybox
the overlay is the dark semitransparent layer mask covering your web
page when fancybox pops up (behind fancybox)

if using fancybox v1.3.x, change the overlay color this way:

$(".fancybox").fancybox({
"overlayColor": "#999"
});

if using fancybox v2.x, check http://stackoverflow.com/a/9913999/1055987

Often fancybox itself is mistakenly called "overlay"
Reply all
Reply to author
Forward
0 new messages