Cannot see multiple html fragments

D

Dabbler51

Hi, I have designed a small site in which I want to allow visitors to right
click and Save Target As.. I have a short htlm code fragment ( <div
align="left"><a href="Docs/Newsletters/NewsletterAutumn2008.doc"><img
border="0" src="Images/Worddoc.gif" width="53" height="54"></a> ) which I
have inserted on to the page. This works as a single piece of code on a page,
but now I want to add several more of these to the same page so visitors can
select which newsletter etc to download. When I copy and paste the fragment,
I can only see the original code and none of the pasted ones. I am using
Publisher 2003. Thanks
 
D

Don Schmidt

Am I correct that you want to make a .doc file available for download?

If so, have you considered using a hyperlink?

That is, place the .doc file in a folder on your website and have a
hyperlink access it.

BTW, a .pdf file is probably more likely to be opened by more visitors than
a .doc file; visitor may not have a .doc program whereas .pdf readers are
many and free.

If you wish to use the hyperlink method, I, we, would be available for some
instruction.
 
D

DavidF

That is strange...I was able to reproduce this, and have not experienced
this before. I don't know the answer, but you might try changing the link
and source paths in the code snippet to absolute links, rather than relative
and see if that makes any difference.

If nothing else, perhaps approaching it this way would work:
Including external files in a Publisher web:
http://msmvps.com/blogs/dbartosik/archive/2006/01/07/80561.aspx

DavidF
 
D

Dabbler51

Hi Gentleman, Thank you for replying so soon. I have read many of the
articles in the forum and learnt so much. Your efforts are appreciated. I
will convert the doc files to pdf. You are quite right about being able to
open them. I did copy one fragment and actually noticed it further down the
page. By elimination I found that the location of the first fragment
determined the position, but any other fragments then had to be 'stacked' one
on top of the other in the top left hand corner of the page at location 0
horiz, 6 height. (the 6 being spacing between) By positioning them there, the
second and further fragments cascaded one below the other, below the first
placed fragment. Strange, it works, atleast in IE6. Will have to check
others. I must also confess lack of knowledge re relative and absolute links.
If this may make a change, could you please show me how the change can be
made. I also forgot to say that I had another small code located at the top
of the page to alter underline hyperlink text. I will continue to resolve the
issues and keep reading. Keep up the great work. Thanks
 
D

DavidF

Remove the ' <div align="left"> ' from your code fragment and try it again.
Or in other words try:


DavidF
 
E

Eric James

Your code fragment is incomplete and as it stands will affect everything
which follows it in your page, which seems to be the effect you have
witnessed. It requires the addition of a closing div tag to complete it,
thus:
<div align="left">
<a href="Docs/Newsletters/NewsletterAutumn2008.doc">
<img border="0" src="Images/Worddoc.gif" width="53" height="54">
</a>
</div>

"<div>", like numerous other html tags such as "<table>", "<tr>", "<td>",
"<a>", "<span>" etc, is an enclosing tag which must have a partner closing
tag, i.e. "</div>" in this case, after the enclosed section.
For correctness, the "img" tag should also have a closing tag and an "alt"
attribute, often written thus:
<img border="0" src="Images/Worddoc.gif" width="53" height="54" alt="Word
document" />
The alt text may be displayed on mouse rollover and would be used by readers
for the impaired etc., but given the multitudinous errors which will exist
in the rest of the publisher document, worrying about this little bit of
correctness will be insignificant.
If you want to do your pages properly, don't use Publisher.
 
D

Dabbler51

Gentleman, Thank you for your positive responses. Both DavidF's and Eric's
answers were correct. By either removing the div align code or adding the
</div> code, both fixed the problem. I tried separate coding and each worked
OK. They do exactly what they say. The web site is for a local cricket club
and is therefore fairly static without fancy bits or many changes being
required. As a beginner, Publisher solved the problem to get the site up and
running with only a few updates being required. Time will tell. Thanks again
for your answers. Your efforts are much appreciated. Dabbler51
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top