WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Trouble putting Meta Slider Lite and TablePress next to each other (9 posts)

  1. vision203
    Member
    Posted 7 months ago #

    I am having difficulty putting a slider from Meta Slider Lite and a table from TablePress side-by-side in a header. The table keeps going under the slider, not to the right of the slider. You can see the issue at http://www.ctaxchange.com/. I've been searching for a solution to this problem, but nothing has worked so far. Can someone please help me out?

    Here is a snippet from the header.php:

    <div id="st-banner0-wrapper" style="background-color:<?php echo get_theme_mod( 'banner_background', '#446b9a' ); ?>; border-color:<?php echo get_theme_mod( 'banner_top_line', '#525458' ); ?>; padding:<?php echo get_theme_mod( 'banner_fp_bg_padding', '0px' ); ?> ;">
    
    			<?php if ( ! dynamic_sidebar( 'sidebar-0' ) ) : ?>
    
                    <?php if( get_theme_mod( 'hide_demobanner' ) == '') { ?>
    				<?php if (is_front_page() || is_home()) {echo do_shortcode("[metaslider id=65]"); } ?>
    				<?php echo do_shortcode("[table id=6 /]"); ?>
    				<?php } ?>
    			<?php endif; // end sidebar widget area ?>
    
    		<?php $header_image = get_header_image();
    			if ( ! empty( $header_image ) ) : ?>
    				<div id="st-header-image" >
    					<img src="<?php header_image(); ?>" class="header-image center" height="<?php echo get_custom_header()->height; ?>" width="<?php echo get_custom_header()->width; ?>" alt="<?php bloginfo( 'name' ); ?>" />
    				</div>
    		<?php endif; ?>
  2. TobiasBg
    Member
    Posted 7 months ago #

    Hi,

    thanks for your post, and sorry for the trouble.

    For this, you should add CSS like this to make them float next to each other:

    .metaslider-65 {
      float: left;
    }
    .tablepress-id-6 {
      float: right;
    }

    Regards,
    Tobias

  3. vision203
    Member
    Posted 7 months ago #

    Thanks for your help! I just added margins to the CSS to center them a bit.

    .metaslider-65 {
      float: left;
      margin-left: 12%;
    }
    
    .tablepress-id-6 {
      float: right;
      margin-right: 12%;
    }
  4. TobiasBg
    Member
    Posted 7 months ago #

    Hi,

    no problem, you are very welcome! :-) Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven't, please rate TablePress here in the plugin directory. Thanks!

  5. Dito Veloce
    Member
    Posted 6 months ago #

    Hi friends, I have an issue similar to vision203's.

    I am trying to put one Soliloquy Slider inside of one Table (or cell) with no success. My idea is to divide the screen in two parts at 50%. Left side will be for text, and right side of screen will be for the Slider.

    This are my results untill now :(
    http://www.appliedlasersystems.com/medical/?page_id=13

    Solioquy shortcode for the slide is [soliloquy id="543"]

    Solioquy Function is if ( function_exists( 'soliloquy_slider' ) ) soliloquy_slider( '543' );

    Question 1 : Is there any way to put a slider (any slider) inside of a Table or Cell?

    Question 2 : Is there any way to scale the slider inside of the Table or cell? (i.e: I build the Slider at 600px x 500px but this is too much for 50% of screen so I guess if I could resize it at 350px x 200px in the Table or Cell).

    Many thanks to all supporters.

  6. Dito Veloce
    Member
    Posted 6 months ago #

    I have made some progressions adding this custom css:

    #soliloquy-container-543 {
    /** If you want the slider to float to the left, use float: left; instead */
    width: 50%;
    float: right;
    border: 6px solid #ffffff;
    }

  7. TobiasBg
    Member
    Posted 6 months ago #

    Hi,

    I would actually not recommend to use a table for this, as it would be against the semantic meaning of a table.

    Instead, you should wrap the slider and the text in e.g. <div> containers and position them with some CSS like what you already posted.

    Regards,
    Tobias

  8. Dito Veloce
    Member
    Posted 6 months ago #

    Thanks a lot for your trick Tobias, I'm newbie with code, I will follow your advise. Regards.

  9. TobiasBg
    Member
    Posted 6 months ago #

    Hi,

    no problem, you are very welcome! Always glad when I can help!

    Best wishes,
    Tobias

Reply

You must log in to post.

About this Topic