• Was wondering if someone with better php skills could help me find a solution to placing text in front of my form fields. Here is the code in my header.php:

    <div class=”right-header clearfix”><h6 class=”formidable”>Sign Up For Our Newsletter!</h6><?php echo FrmFormsController::get_form_shortcode( array( ‘id’ => 2, ‘title’ => false, ‘description’ => false ) ); ?>
    </div>

    When viewed in the browser the h6 text appears above the subscription form and I would like it to be inline with it and in front of it. Am I on the right track thinking that it should be included inside the php? I’ve tried using css to make it inline and in front but nothing I try there will work. I can’t provide a url because it is on my local server but here is a screenshot of what I am talking about.

    <a href="https://www.vanislebc.com/images/screenhunter/ScreenHunter_01 Oct. 18 12.57.gif"></a>

    Shouldn’t the link to the screenshot automatically embed the image into this post?

Viewing 1 replies (of 1 total)
  • PHP doesn’t control appearance, css is the tool for that. Setting display:inline is the way to go. Possible reasons for it not working include:
    – the containing block is not wide enough
    – if the form fields are floated, the h6 must be also
    – make sure there are no clears between elements
    – an error in your css that prevents your style being read, so check your css with a validator:
    https://jigsaw.w3.org/css-validator/
    – precedence: any style with a more specific selector, or with the same selector and loaded later in the page, will take precedence. You will need to use browser tools to check for this.

    I’ve never seen an image embedded in a post here. When embedding a url in a post, just put the url on its own line with no html tags or code ticks.

Viewing 1 replies (of 1 total)
  • The topic ‘Embed html inside php tags’ is closed to new replies.