• Resolved ejsuhh

    (@ejsuhh)


    Hello,

    How would I go about including images in the tabs that I am going to make? Is there a code that I need to put into the backend of my wordpress site?

    I am also trying to figure out if the only way to create a tab is by entering the shortcode into my website. I am a complete beginner when it comes to coding website design, so if there is an easier way than typing in shortcodes, I would appreciate someone letting me know how!

    Thanks again in advanced.

    https://wordpress.org/plugins/tabby-responsive-tabs/

Viewing 1 replies (of 1 total)
  • Plugin Author cubecolour

    (@numeeja)

    This isn’t supported directly by the plugin, and although the optional Tabby Responsive Tabs Customiser add-on can help produce custom styles without coding, it doesn’t include anything to add images or target unique styling attributes to individual tabs.

    You can however use some custom css to achieve what you have described by applying an image background to each tab and hiding the text. You will probably also want to specify an alternative image to be show to indicate when the tab is selected.

    The index numbers for tablist and tab in the selectors below indicate which tab group on the page and which tab in that tab group is being selected.

    for example:

    #tablist1-tab1 {
    	background: url("images/jake.png");
    	text-indent: -9999px;
    	height: 100px;
    	width: 100px;
    }
    
    #tablist1-tab2 {
    	background: url("images/milo.png");
    	text-indent: -9999px;
    	height: 100px;
    	width: 100px;
    }
    
    #tablist1-tab3 {
    	background: url("images/bella.png");
    	text-indent: -9999px;
    	height: 100px;
    	width: 100px;
    }
    
    #tablist1-tab4 {
    	background: url("images/fizz.png");
    	text-indent: -9999px;
    	height: 100px;
    	width: 100px;
    }
    
    #tablist1-tab1.responsive-tabs__list__item--active {
    	background: url("images/jake-alt.png");
    	border: none;
    }
    
    #tablist1-tab2.responsive-tabs__list__item--active {
    	background: url("images/milo-alt.png");
    	border: none;
    }
    
    #tablist1-tab3.responsive-tabs__list__item--active {
    	background: url("images/bella-alt.png");
    	border: none;
    }
    
    #tablist1-tab4.responsive-tabs__list__item--active {
    	background: url("images/fizz-alt.png");
    	border: none;
    }

    If you have tabs on more than one page and you only want to style tabs on a particular page, you should also add a body class in front of each selector to target that page only so that any tabs on other pages are not affected by these styles.

    The recommended way to use add css to target the tabs is outlined in the plugin’s documentation.

    The shortcodes used to create the tabs are designed to be as simple and easy to use as possible. The optional customiser add-on does add basic tinyMCE buttons to the visual editor to help with adding the shortcodes, however this manually adding the shortcodes should not present any problems.

Viewing 1 replies (of 1 total)

The topic ‘Images in tabs’ is closed to new replies.