• Oh please help dear www.ads-software.com!

    I am trying to align my echo shortcode to the right of a logo in my header. It keeps falling below the logo. I have tried all kinds of style ideas. Does anyone have a clue of how to do this? THANK YOU!

    Here is the site: https://afengineering.co

    This is in my head.php

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    </head>
    <body <?php body_class(); ?>>
    <div id="wrap">
    	<div id="header">
        	<div id="header-logo">
    			<?php if ($xs_custom_logo !='') { ?>
    				</a><a>" title="<?php bloginfo( 'name' ) ?>" rel="home"><img src="<?php echo $xs_custom_logo ?>" alt="<?php bloginfo( 'name' ) ?>" /></a>
    			<?php } else { ?>
                	<?php if (is_front_page()) {?>
            			<h1><a>/" title="<?php bloginfo( 'name' ) ?>" rel="home"><?php bloginfo( 'name' ) ?></a></h1>
                    <?php } else { ?>
                    	<h2><a>/" title="<?php bloginfo( 'name' ) ?>" rel="home"><?php bloginfo( 'name' ) ?></a></h2>
    				<?php } ?>
            		<p id="header-description">
    					<?php bloginfo( 'description' ) ?>
    				</p>
    			<?php } ?>
    <div class="clear"></div>
            </div><!-- /header-logo -->
    <div id="head-banner">
    <?php echo do_shortcode('[swfobj src="https://afengineering.co/wp-content/uploads/2012/11/antrotation1.swf"]
    '); ?>
    </div><!-- /head-banner -->
    </div><!-- /header -->
    	<div id="primary-menu">
Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter webmarshall

    (@webmarshall)

    Whoops: site is afengineering.co

    I need the ants to sit to the right of the logo

    On line 76 in styles.css, #header-logo, add “float: left;” and change the width to 350px;

    #header-logo {
    float: left;
    width: 350px;
    }

    Thread Starter webmarshall

    (@webmarshall)

    Ahhhh, you are awesome! It worked perfectly. Ok, being the “why” person that I am…was it the float:left that allowed the ants to float left as well?

    Thank you Thank you Thank you!

    That was just a quick fix. It floats everything after the DIV to its right. I assumed you didn’t know much css, so I made it easy for you.

    Normally, you would do the same as as above. Then add a float property to the DIV around the swf object. Then clear both float all together.

    #header-logo {
    float: left;
    width: 350px;
    }

    #head-banner {
    float: left;
    width: the width of that swf object, or what ever the remaining width.
    }

    See: https://www.w3schools.com/css/css_float.asp and https://css-tricks.com/all-about-floats/

    Thread Starter webmarshall

    (@webmarshall)

    Thank you very much! I will study CSS with more diligence ??

    Happy Holidays!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add SWF to right of logo in header’ is closed to new replies.