Results 1 to 3 of 3

Thread: Center haccordion in a table

  1. #1
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Center haccordion in a table

    1) Script Title: haccordion

    2) Script URL (on DD):http://www.dynamicdrive.com/dynamici...haccordion.htm http://www.bluestarcompany.co.uk/bri...tegallery.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

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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:

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

  3. #3
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    DD ADMIN you are a STAR :-) Many thanks works a treat LOL Eileen

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •