PDA

View Full Version : Center haccordion in a table



Eileen
07-13-2011, 10:17 PM
1) Script Title: haccordion

2) Script URL (on DD):http://www.dynamicdrive.com/dynamicindex17/haccordion.htm http://www.bluestarcompany.co.uk/brightstar/itsuitegallery.html

3) Describe problem: I have put this script in a table and it looks great apart from the fact that I cannot centre it - so it clings to the left hand side of the page with a great white gap on the right! Ive tried everything that I know so any help would be much appreciated.

Thanks Eileen

ddadmin
07-17-2011, 05:48 AM
Centering the accordion is somewhat difficult due to the fact that its LI elements are floated "left". A quick and easy way to simulate the appearance of centering is to add some left margin to the accordion's main UL. For example, inside its CSS file, add the part in red:


.haccordion ul{
margin: 0;
padding: 0;
margin-left:100px;
list-style: none;
overflow: hidden; /*leave as is*/
}

Adjust 100px as desired.

Eileen
07-17-2011, 05:37 PM
DD ADMIN you are a STAR :-) Many thanks works a treat LOL Eileen