WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] PHP Echo Control With CSS (3 posts)

  1. David_1
    Member
    Posted 1 year ago #

    Hello Friends,

    I am desperately trying to align a SlideDeck 2 -to the left of where it currently sits.
    The site is: http://www.millionstreets.com/
    I am using a Child theme of the Landpost theme in which I am using the following on the home.php page:

    <?php
    /**
     * The template for displaying the Home Page.
     *
     * @package WordPress
     * @subpackage Landscape
     * @since Landscape 1.0
     */
    
    get_header();
    ?>
    
    <strong><?php echo do_shortcode( "[SlideDeck2 id=3258]" ); ?></strong><div id="home-search">
    					<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">

    I am using the following in a Post for the SlideDeck 2:
    <?php do_shortcode("[SlideDeck2 id=3258 iframe=1 ress=1 proportional=false]"; ?>

    I have created the following in my Child theme to control the SlideDeck2:

    #SlideDeck-3258-frame {
    	margin-left: auto;
    	margin-right: auto;
    }

    How I arrived at the term, #SlideDeck-3258-frame in my CSS, is that from what notice (and I am sure I am missing something), it at least will allow me to shift the SlideDeck around a little, although very uncontrollably.

    Essentially what I need to do is have the Slidedeck appear on the left side of the Search. If anyone has any ideas on how I might get some control over this SlideDeck 2 element I would be very grateful to hear from you.

    I thank you in advance for your thoughts and efforts with this.

  2. graphical_force
    Member
    Posted 1 year ago #

    I would create a div the width of the body of the content and then put the slider and the search div inside of that. Something like:

    <div id="sliderSearchContainer">
    <div id="sliderContainer"></div>
    <div id="searchContainer"></div>
    <div>
    
    #sliderContainer {
    float: left;
    }
    
    #searchContainer" {
    float: right;
    }
    
    #sliderSearchContainer {
    width: 960px;
    margin: auto;
    }
  3. David_1
    Member
    Posted 1 year ago #

    Hello graphical_force,

    Thank you very kindly for your time and your advice.
    It was the answer I needed and seems to be working fine.

    I wasn't really thinking in terms of the slider and search as two elements I could bring together, (but have thought that way in the past at times).
    I knew the search location never varied, which (I think) got me focused solely on how I could work with just the slider.

    Again many thanks for your advice, expertise, and especially for taking time out of your day to help me out.

    So that others may benefit from your advice this is exactly what I did:

    home.php:

    <div id="sliderSearchContainer"><div id="sliderContainer"><?php echo do_shortcode( "[SlideDeck2 id=3258]" ); ?><div id="home-search"><div></div>
    					<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">

    Child CSS:

    #sliderContainer {
    	float: left;
    	padding-left: 15px;
    }
    #home_search {
    	float: right;
    }
    #sliderSearchContainer {
    	width: 960px;
    	height:120px;
    	margin: auto;
    }

    Thank you again graphical_force!

Topic Closed

This topic has been closed to new replies.

About this Topic