Reputation: 3
I'm writing an access piece of code that "walks" a user through a specific process. The code in basic HTML code that shows up as regular text in an Access Textbox control.
My text needs to look like:
<div>Steps Taken:</div>
<div> </div>
<div>1. Batchfile or email has been used to open this project.</div>
<div>2. Select/Deselect the necessary Folder checkbox.</div>
<div> (Complete One at a time.)</div>
<div> 2a. Analytical Lab Selected</div>
<div>3. Adjust optTextTypes as necessary or click "Skip This Step".</div>
<div>4. Adjust Project Status as Necessary (Most New Requests</div>
<div> will have a Project Status of "In Progress".)</div>
<div>5. Adjust Project Status Notes for this Release then click</div>
<div> ("Skip This Step".)</div>
<div>6. <span style="color: #ff0000;">Add, ignore, or change LIMS Parent Project Number</span></div>
<div><span style="color: #ff0000;"> and then click ("Skip This Step".)</span></div>
But, it continues to look like:
<div><font color=black>Steps Taken:</font></div>
<div> </div>
<div><font color=black>1. Batchfile or email has been used to open this project.</font></div>
<div><font color=black>2. Select/Deselect the necessary Folder checkbox. </font></div>
<div><font color=black> (Complete One at a time.)</font></div>
<div><font color=black> 2a. Analytical Lab Selected</font></div>
<div><font color=black>3. Adjust optTextTypes as necessary or click "Skip This Step".</font></div>
<div><font color=black>4. Adjust Project Status as Necessary (Most New Requests</font></div>
<div><font color=black> will have a Project Status of "In Progress".)</font></div>
<div><font color=black>5. Adjust Project Status Notes for this Release then click</font></div>
<div><font color=black> ("Skip This Step".)</font></div>
<div><font color=black>6. </font></div>
<div><font color=red>Add, ignore or change LIMS Parent Project Number</font></div>
<div><font color=red> and then click ("Skip This Step".)</font></div>
I can't get it to show the issue here, but basically, after the #6 is displayed the sentence jumps a complete line. I've pasted the code into other HTML online versions and it shows the line skip. I get it working on the online version, copy the HTML and paste it back into my access app, but the line skip happens again.
Not sure what I should be looking at to get it to work?
Upvotes: 0
Views: 57
Reputation: 967
This happens because div
is a html block element. Which means when you use it, each new div starts in new line.
So your point 6 and text next to it moves in different lines because of 2 div
s.
I would suggest to use a span
for your text since its not a block element.
Below is the code which you can use for your point 6:
<div><font color=black>6.
<span style="color:red"> Add, ignore or change LIMS Parent Project Number </span>
</font></div>
Also, to make your job easier I would suggest to use ordered list of HTML
.
Below is the plnkr example I have created for you. It has ordered list with minimal styling.
https://plnkr.co/edit/fjA60WtwsL9IhzSK?open=lib%2Fscript.js&preview
Upvotes: 1