LaNina said:
Great! Thanks a lot Trevor, exactly what I was looking for!
Bit puzzeling though, just started FrontPageing two days ago and
don't know nothing about html langauge.
If I want my text fields just to start a bit lower on the page, so I
can add other stuff above, how do I do this?
And a detail (just to get to understand a little what I am doing):
Where do </div> and </p> stand for?
Thanks!
Hi La Nina,
Yes, if you haven't yet delved into HTML, then it can be a bit daunting.
What FP does is create HTML. It has many bells and whistles, but that is is
purpose.
Sooner or later, every user of FP will have to know a little about HTML. A
year ago I knew nothing, now I can actually converse with the experts here
about aspects of the language. If you just take it steadily, it will soon
become easier.
To start the text fields lower on the page, just place other stuff above it.
This can even be nothing, just a series of line breaks <br><br><br><br>. In
FP you do this by pressing enter.
This is not the best way. You will usually want to place some meaningful
text, images whatever.
You can also position the <div>. I am not sure that this is the best way
either- the experts say to beware.
However, this is how to do it:
In the <head> section, define a class - note the leading dot(.) in .lower
<style type ="text/css">
..lower {position: absolute; top: 30%}
</style>
Then place this in the HTML in the <body>
<div class = "lower">
........
</div>
Everything between <div class = "lower"> and </div> will then start lower
down the page - at 30% of your browser height.
The reason to beware is that absolute positioning means that this division
wil start at this position even if you have other text which would be there.
The absolutely positioned division will go on top of the other stuff.
To access the HTML, use the HTML or Code view (I think different versions of
FP have different names for these tags). You will see the HTML displayed and
you can edit it to your hearts' content. This is how you can add stuff to
the <head> or make a <div> in the <body> section
To answer your specific questions.
Each tag must be opened and closed.
So a <div> tag must be closed by a </div>
<div> is the start of a division, </div> is the end of the division
<p> is the start of a paragraph, </p> is the end of the pararaph
Some tags are self-closing, e.g. the line break tag <br>.
But XHTML, which is a stricter version of HTML, insists that even
self-closing tags be closed.
For example, a line break is written as <br /> - note the slash (/) before
the ">".
In XHTML, other tags also have the slash to close them e.g. <img
src="imges/pic1.jpg" alt="" height= "500px" width="500px" />
So I get into the habit of doing this anyway - it doesn't hurt and makes
conversion to XHTML easier.
P.S.
Here is some amended code which adds a style to the div so that you can see
its borders.
I think this is closer to the idea of a tetxbox which you first asked for
<html>
<head>
<style type="text/css">
div {width:50%;border:1px black inset;}
</style>
<script type="text/javascript">
function hideit(elid,hide)
{
if (hide != "show")
document.getElementById(elid).style.display="none"
else
document.getElementById(elid).style.display="block"
}
</script>
</head>
<body>
<div id="part1" border="10px" onmouseover="hideit('part2','show')">
This is part 1 of the code
</div>
<div id="part2" border="1px" style="display:none"
onmouseout="hideit('part2','hide')">
This is part 2 of the code<br>
Blah blah blah <br>
Blah blah blah <br>
Blah blah blah <br>
Blah blah blah <br>
Blah blah blah <br>
Blah blah blah <br>
Blah blah blah <br>
Blah blah blah <br>
</div>
</body>
</html>