100% Div Fixes Width When Using JQuery Cycle

7th December, 2011 in Technical

If using a 100% DIV width for a JQuery Cycle container, JQuery Cycle will find the width of the container when its rendered and fix it to this width so when you then resize the browser the container stays at the fixed width.

This means if you have a 100% wide DIV that is required to be centered, it will not stay central when resizing the browser.

I found the solution here:
http://stackoverflow.com/questions/3273137/jquery-cycle-slideshow-resize-problem/

Just use !important for the DIV width:-

#module_rotator
{
    width: 100% !important;
}

Leave a Reply

Recent