Results 1 to 10 of 10

Thread: Tabbed Content Not Working With Many Tabs

  1. #1
    Join Date
    Sep 2014
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Tabbed Content Not Working With Many Tabs

    Followed a tutorial for a tabbed section to be put in a page. The original tutorial featured four tabs but I needed 9, which I added. The result is:

    http://gmjones.org/tabs3.html

    I know how to create two containers, one for the content and one for the tabs. But how can the existing CSS be adjusted to target a list of divs and have them slide or fade into view.

    Thanks in advance.

    (html/css file attached...)
    Attached Files Attached Files
    Last edited by Beverleyh; 09-15-2014 at 02:03 PM. Reason: formatting

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    Followed a tutorial for a tabbed section to be put in a page
    For reference, please provide a link to the tutorial that you followed.

    But how can the existing CSS be adjusted to target a list of divs...
    The markup provided *is* a series of divs - can you please clarify what divs you are referring to. (additional ones? existing ones?)

    ... and have them slide or fade into view
    You can create a fade-in effect with CSS like this;
    Code:
    .content p { -webkit-animation:fadein 0.5s; animation:fadein 0.5s }
    @-webkit-keyframes fadein { from {opacity:0} to {opacity:1} }
    @keyframes fadein { from {opacity:0} to {opacity:1} }
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. #3
    Join Date
    Sep 2014
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The tutorial was from CSS-Tricks > http://css-tricks.com/functional-css-tabs-revisited/

    What I meant by targetting divs was having them targetted when they were in a separate container away from the tabs/buttons. From the example, targetting the .content name is how it's done but I'm at a loss as to how to set up the separated tabs/buttons.

    Sorry for any confusion...

  4. #4
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    But what are you trying to target exactly? (The actual element). And in what circumstances - at the same time the checkboxes are checked? or just in general, for example if you are having issues with inheritance within the cascade? Unfortunately, you still aren't being very clear.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  5. #5
    Join Date
    Sep 2014
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    My web design experience is pretty limited, so I don't yet understand 'inheritance within the cascade'. What I want it to click a tab or button and have the corrsponding content come into view i.e. click on 'Solicitor' and text/images for 'Solicitor' appearing in the box.

  6. #6
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    That appears to be exactly what you have - you would put your content into the div with the "content" class.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  7. #7
    Join Date
    Sep 2014
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    But the tabs aren't detached so they are clearly visible.

  8. #8
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    Do you mean to say?

    "Since I added more tabs, the ones on the top row are being overlapped by the tabs on the bottom row, and I want them to be clearly visible and separate? How do I edit the CSS to give them space?".
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  9. #9
    Join Date
    Sep 2014
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Exactly!

  10. #10
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    And ultimately, are you working with a fixed-width layout or do you want the tabs to respond/adapt when the browser is narrowed?

    That's the biggest issue at the moment. You could fix the width of the page and hard-code the CSS changes only to the tabs that need attention (if for example, "Gibraltar Panel Liquidator" were always to appear in the same position - 1st spot on row 2 - you can add extra CSS only to the 2nd row of tabs), but if you are working within a responsive layout, where you cant guarantee how the tabs will flow on to new lines/rows, that would be more difficult. The CSS might need a complete rethink and tabbed-content effect might not be the best choice afterall in that case.

    Tell us more about the big picture?
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

Similar Threads

  1. Ajax Tabs Content Script (v 2.2) not working at my end
    By rizwan in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 11-08-2008, 10:18 AM
  2. Tab Content Script (v 2.2) selected tabs not working?
    By bonesbrigade in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 09-05-2008, 04:10 AM
  3. Ajax Tabs Content script - Non Tabbed Content
    By Dean in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 07-19-2007, 09:33 AM
  4. tabbed oontent tabs
    By decbrad in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 07-09-2007, 11:57 AM
  5. tabbed content: inactive tabs
    By snooper in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 02-01-2006, 11:03 AM

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
  •