Click to See Complete Forum and Search --> : Calling the Gurus - BLOCKQuote problem


vincentms
04-17-2003, 05:51 PM
Hello All,

I have some text that is not wrapping correctly. How can I get my text to appear in a block if it must wrap around to a 2nd line. What happens is the text on the 2nd line is further to the left than the 1rst line. I want the 2nd line to start directly under the 1rst line. Line 1 appears in the right place and it just looks better when it is in a block. I have tried the BLOCK Quote tag and that works fine, ALMOST. BUT, it pushes Line 1 to the next line with a LineBreak/LineFeed. That is not good for me, shucks!

Any thoughts???

Vincent,
Zürich, Switzerland

khalidali63
04-17-2003, 06:03 PM
do you have this text in a table cell?

khaki
04-17-2003, 07:52 PM
Hi Vincent...

Blockquote is an old html method for creating margins within a page (now pretty-much replaced by CSS).

And I don't recall if the wrapping within a blockquote allows a new line to begin with a leading space (as you say it is doing for you)... but if so...you may need to insert <br> tags at the ends of sentences to stop it from doing so.

I haven't used blockquote since I first started learning html about 8-10 years ago (yikes :eek: . I was just a baby!).

I'd suggest using a <div> and place the text withing that. I've never seen a new line begin with a leading space when using a <div>.

Hope that helps...
;) k

vincentms
04-18-2003, 01:50 AM
Hello all,

Thanks again for the kind responses, I am becoming very very spoiled!!!

Khalid: I am not using a table.

Jersey Girl: I am sure you are still just a baby.

Folks, please see my code. I dont know how to stop the funny wrap around.

The output from element [3] indents the first line, which is perfect, but if it wraps to a 2nd line the 2nd line starts flush left...which is ugly! I would like that wrapped line to start at the same margin as the preceding line.

BTW, I will need to make the same correction for the Radio Button text (elements[6,7,8...]).

Any more thoughts???

Thanks,

Vincent
Zürich, Switzerland




document.getElementById("divn").innerHTML =
('<p><b><font color="navy" size=4> &nbsp &nbsp &nbsp' + qCnt + '</font> &nbsp' + globalArray[arrayNames[3]][s] + '</b></p>') +
('<p> &nbsp &nbsp &nbsp &nbsp <input type="radio" value="a" name="q10">' + " " + globalArray[arrayNames[6]][s] + '</<br></p>') +
('<p> &nbsp &nbsp &nbsp &nbsp <input type="radio" value="b" name="q10">' + " " + globalArray[arrayNames[7]][s] + '</<br></p>') +
('<p> &nbsp &nbsp &nbsp &nbsp <input type="radio" value="c" name="q10">' + " " + globalArray[arrayNames[8]][s] + '</<br></p>') +
('<p> &nbsp &nbsp &nbsp &nbsp <input type="radio" value="d" name="q10">' + " " + globalArray[arrayNames[9]][s] + '</<br></p>') +
('<p> &nbsp &nbsp &nbsp &nbsp <input type="radio" value="e" name="q10">' + " " + globalArray[arrayNames[10]][s] + '</<br></p>') +
('<p> &nbsp &nbsp &nbsp &nbsp <input type="radio" value="f" name="q10">' + " " + globalArray[arrayNames[11]][s] + '</<br></p>') +
(' &nbsp &nbsp &nbsp <input type="button" value=" Next Question" onClick=" getStarted()"> ') +
(' &nbsp &nbsp &nbsp <input type="button" value=" Finish " onClick=" correctExam()"> ');

DrDaMour
04-18-2003, 02:07 AM
what is the value of qCnt?

vincentms
04-18-2003, 02:34 AM
Hi,

The value of qCnt is just a number, (i.e, 1, 2, 3...20)

Thanks.

Vincent,
Zürich, Switzerland

DrDaMour
04-18-2003, 02:47 AM
well i don't see the first line indenting at all, so i don't understand what you're talking about. Everything for me is just one after then next. I think you need to upload your whole file, as taht code snipet has a ton of errors in itself without the entire file.

vincentms
04-18-2003, 04:54 AM
Here is my code without errors.

Please note that if you make the browser window small enough forcing the question to WRAP that the 2nd line does not start under the 1rst, but instead it is FLUSH LEFT.

Regards,
Vincent
Zürich, Switzerland

<p><b><font color="navy" size=4> 12 </font> So here is the 64,000 dollar question: What State borders the lovely country of Mexico? </b></p>
<p><input type="radio" value="a" name="q10"> Texas <br></p>
<p><input type="radio" value="e" name="q10"> Missouri <br></p>
<p><input type="radio" value="f" name="q10"> Iowa <br></p>

<input type="button" value=" Next Question">
<input type="button" value=" Finish ">

DrDaMour
04-18-2003, 05:12 AM
ok first off, it wasn't indented at all, it just happened taht the item number made it look like it was, but it was pushing it. Second i think what you were doing was hitting tab to indent it or doing a lot of spaces, but that won't work becasue html only recognizes single blank spaces.

what you want to use is a html escape sequence
you could use &nbs p; (get rid of the space inbetween sp, this sends a space no matter what.However what i woudl recommend instaed is using a table like so, this did what you wanted



<html>

<body>
<table>
<tr>
<td valign="top">
<font color="navy" size=4> 12 </font>
</td>
<td valign="top">
So here is the 64,000 dollar question: What State borders the lovely country of Mexico?
</td>
</tr>
</table>
<p><input type="radio" value="a" name="q10"> Texas <br></p>
<p><input type="radio" value="e" name="q10"> Missouri <br></p>
<p><input type="radio" value="f" name="q10"> Iowa <br></p>

<input type="button" value=" Next Question">
<input type="button" value=" Finish ">


</body>

</html>

vincentms
04-18-2003, 05:41 AM
Yo Detroit,

You're good...very good. Between you and Khalid I have some new friends, oh yeah, cant forget to send props out to Jersey girl.

Thanks everybody.

Not so fast Detroit!!! There is one little thing more.

The question is not with the desired alignment. Perfect. But, the answers that are next to the RadioButton has the exact same WRAP problem. Do you think it is possible to fix the text that is adjacent to the RadioButton. Please look at the example below. It is basically what you gave me, but I have extended the TEXT so to make it wrap around.

Thanks man,
Vincent

Zürich, Switzerland

<body>

<table>
<tr>
<td valign="top">
<font color="navy" size=4> 12 </font>
</td>

<td valign="top">
So here is the 64,000 dollar question: What State borders the lovely country of Mexico?
</td>
</tr>
</table>


<p><input type="radio" value="a" name="q10"> HINT: Texas is the right answer as she lies just above the Big River...but we all knew that didn't we partner?<br></p>
<p><input type="radio" value="e" name="q10"> Missouri <br></p>
<p><input type="radio" value="f" name="q10"> Iowa <br></p>

<input type="button" value=" Next Question">
<input type="button" value=" Finish ">

</body>

</html>

DrDaMour
04-18-2003, 05:54 AM
guess we can thnk M&M for that

anyways

<html>

<body>

<table>
<tr>
<td valign="top">
<font color="navy" size=4> 12 </font>
</td>

<td valign="top">
So here is the 64,000 dollar question: What State borders the lovely country of Mexico?
</td>
</tr>
</table>

<table cellpadding=0 border=1>
<tr>
<td valign="top">
<input type="radio" value="a" name="q10"> Texas
</td>
<td valign="top">
HINT: Texas is the right answer as she lies just above the Big River...but we all knew that

didn't we partner? </td>
</tr>
<tr>
<td valign="top">
<input type="radio" value="e" name="q10"> Missouri
</td>
<td></td>
</tr>
<tr>
<td valign="top">
<input type="radio" value="f" name="q10"> Iowa
<td></td>
</td>
</tr>
</table>
<input type="button" value=" Next Question">
<input type="button" value=" Finish ">

</body>

</html>


the border=1 will show you toe borders of the table so you can understand how htey work better, change it to 0 to make the borders go away.

you'll need to play with it

think of the table tags as so
<TR> is a table row
<td> is a table data or cell

<td>s are in <tr>'s and each <tr> should have the same amount of <td>'s

Nevermore
04-18-2003, 06:05 AM
Just my 2 cents - Khaki, you should really use blockquote for quotes, rather than a DIV, but not for indenting. It is not an 'old element' though, as it is still part of the specification. The advantage of it is that even if your browser has to read it to you, it can still tell you it is a quote.

khalidali63
04-18-2003, 08:44 AM
Originally posted by DrDaMour
guess we can thnk M&M for that
...........

Hey which ones (reds or blues or...)

:D

Nevermore
04-18-2003, 10:41 AM
Didn't you hear? The reds and blues have had their Ms stolen! If you can find them you win lots of money! Not just advertising, it's drama.

jeffmott
04-18-2003, 12:01 PM
It is not an 'old element' though, as it is still part of the specification.I don't believe it was ever described as an old element, but an old method for creating margins.

khaki
04-18-2003, 12:37 PM
Hi Gang! ...

See.... Jeff understands me!

Blockquote was something that many people once mis-used so that they could create margins.

Anyway... I'm a data girl... so text content (and Blockquote) have little relevence to me now (and for a long time... and sadly... I'm not "still just a baby" anymore :( ).

But it does make me curious...
Is Vincent writing "quoted" text to the page... or just formatting "non-quote" type text with the (mis)use of Blockquote?

So... see?!
Maybe Cijori jumped to the wrong conclusion (and on the wrong person :) ).

Anyhow.. I'm not looking to bust chops... just playing ;)

And once again - and everybody should really pay attention (and I'm serious this time :rolleyes: ) - Cijori has made a statement that should not be overlooked:

"The advantage of it is that even if your browser has to read it to you, it can still tell you it is a quote."

It didn't initially occur to me, but that is a very important thing to remember for writing pages for accessibility. I have learned a lot (but not enough yet) about that... and I am hoping to skew my design and implementation process towards taking things like that into consideration.

Anyway... not trying to preach... just saying :)
(saying and playing... I'm having a busy day! lol)

Last thing:
I don't get the M&M thing (is that a Microsoft diss or something?).

okay... I'm done. But don't (block)quote me on that...
;) k

EDIT: okay... I didn't really need to edit... but I just wanted to acknowledge "the doctor's" Floyd quote in his sig ;) .
(does anyone here realize what he "needs"? Well... let's put it this way: it's dirty! lol ;) )
;) k

Nevermore
04-19-2003, 03:36 AM
RUN!

DrDaMour
04-19-2003, 10:14 AM
floyd owns

khalidali63
04-19-2003, 10:17 AM
Originally posted by cijori
RUN!

:D :D :D

khaki
04-19-2003, 10:30 AM
hmmm...

for some reason people will place song/music references (some subtle... some not) in their posts...
yet hardly anyone contributed to the programmer's music thread in the General Forum.
:confused:

"I gotta admit... that I'm a little bit confused"

;) k (woof!)

DrDaMour
04-19-2003, 11:29 AM
i never visit the general thread, it's way to general for me