horizontal lines in web pages

horizontal lines in web pages

od Helen Walmsley -
Število odgovorov: 4

I've been creating simple resource pages with the html editor in Moodle 1.5.4 and keep getting a strange bug. If I add a horizontal line to separate sections of text it is sometimes moved to the bottom of the page when I open the resource!

The problem seems to reduce if I add the horizontal line last and don't edit the page further before saving it, but even this doesn't always work.

I am in the process of editing and improving my pages all the time, can anyone suggest a way to get the lines to stay put?!

Povprečje ocenitev: -
V odgovor na Helen Walmsley

Re: horizontal lines in web pages

od Lady 800cc -

I can't tell you.  The HTML editor has so many wierd issues. These are the ones that bother me the most:

-Automatic double line when the "enter" key is used instead of going to the very next line. This is especial annoying if you have lines that are a couple of words long, but you want them to be listed one right after another without a space in between. ie:

-Hi all [click enter key for new line]

-How did I get down here instead of just under the first line

-Here I am down here again žalosten

The only way to fix this is to go into the code and remove the <p></p> tags that are ALL OVER THE PLACE!!

V odgovor na Lady 800cc

Re: horizontal lines in web pages

od Kay Patterson -

ALL  HTML editors do that as it is not a word processor as such and you by pressing return are giving it the command to start new para.

Hold down shift and enter to just wrap around
like this.

OK?

V odgovor na Kay Patterson

Re: horizontal lines in web pages

od Lady 800cc -

Hold down the shift key
and enter?
YOU ARE A GOD!!!!!  big grin
Thanks!!
By the way, Homesite does not do that.  That's why I still
use it in addition or as a supplement to other web editors, because it never enters unwanted or extra html code.

V odgovor na Lady 800cc

Re: horizontal lines in web pages

od Joseph Rézeau -
Slika Core developers Slika Particularly helpful Moodlers Slika Plugin developers Slika Testers Slika Translators

Well, pressing SHIFT+ Enter is a pretty standard way of creating what is called a "soft carriage return" in most word processors and also HTML editors (e.g. Dreamweaver). Below is the HTML code, followed by the WYSIWIG result. The <br /> tag is created by SHIFT+RETURN.

<p>this is a one-line paragraph</p>
<p>this is a new one-line paragraph</p>
<p>this is another line <br />
  immediately followed by yet another line
</p>

this is a one-line paragraph

this is a new one-line paragraph

this is another line
immediately followed by yet another line

Please note, however, that the soft carriage return (or <br /> tag) should be used sparingly, and CSS formatting should be preferred if one wants a number of successive lines which are not to be considered as paragraphs. For example, use list formatting (with or without bullets, numbers, etc.)
<ul>
  <li>this is line 1 in a bullet list </li>
  <li>this is line 2 in the same list </li>
</ul>
  • this is line 1 in a bullet list
  • this is line 2 in the same list
<ul style="list-style:none">
  <li>this is line 1 in a non-bullet list</li>
  <li>this is line 2 in the same list  </li>
</ul>
  • this is line 1 in a non-bullet list
  • this is line 2 in the same list

Hope that helps,

Joseph