skip to Main Content

I am trying to make a template that auto fills text into a sentence. I have most of it working now the only issue is anywhere I used a div to fill data it forces the answer onto the next line and it looks really rough. How can I use a div to make a sentence? Below is how it currently looks.

I will be visiting on
*blank*,
 
during the
*blank*

Below is how I want it to look.

I will be visiting on *blank, during the *blank*

Currently this is how it looks in my editor. I am very new so I am sure this is something simple I just haven’t learned yet.

I will be visiting on <div id="output">*blank*/div, during the <div id="Timetext">*blank*/div .

2

Answers


  1. Chosen as BEST ANSWER

    Switched from using <div> to using <span> that resolved the issue. I knew the solution was simple I am very new and teaching myself though.


  2. Instead of using div tag use span tag and use a class name or id for each span tag. You can use the class name to fill it (to call it).

    <div class="fillups">
    <span class = 'first'>I will be visiting on blank</span>
    <!-- for space in between -->
    &nbsp;&nbsp;
    <span class = "second">during the blank</span>
    </div>
    

    The above is the easiest way. If at all you are particular in using div tag, In CSS, you can use display:inline for both the div tags CSS.

    <div class="first" style="display:inline;">
        I will be visiting on blank
    </div>
    
        &nbsp; &nbsp;
    <div class="second" style="display:inline;">
        during the blank
    </div>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search