How can I set the padding to zero if the document is pdf?

C

Cal Who

<li><a href="Doc1.pdf" target="DocFrame">Doc1</a></li>

<li><a href="Doc2.htm" target="DocFrame">Doc2</a></li>

I have statements like the above.

DocFrame is an iFrame element that is inside a Div with nonzero padding set.

For an html document that looks like a letter this put white space around
the text that looks like the margin you normally would see in a letter.

But for a pdf document it does not look good.

How can I set the padding to zero if the document is pdf?

I have no idea how to even start trying so any helpful hint would be
appreciated.



Thanks
 
G

Gregory A. Beamer

But for a pdf document it does not look good.

How can I set the padding to zero if the document is pdf?

I have no idea how to even start trying so any helpful hint would be
appreciated.

You have to do more than simply target the iFrame in these cases. You will
have to actually set some values for the iFrame to get rid of the padding.

One question I have is why do you have to have an iFrame? Is this something
where a user is going to thumb through multiple docs on a single page?

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
C

Cal Who

Gregory A. Beamer said:
You have to do more than simply target the iFrame in these cases. You will
have to actually set some values for the iFrame to get rid of the padding.

One question I have is why do you have to have an iFrame? Is this
something
where a user is going to thumb through multiple docs on a single page?
yes


Peace and Grace,

As I said it is the div (containg the iframe) that contains the padding that
puts a white margin around the iframe.

Where I am now is I'm trying a asp:DropDownList

I hope I can figure out how to set the padding on the div from a
asp:DropDownList event.

How would you do that?

Thanks
 
C

Cal Who

I'm using a asp:DropDownList and almost have it working.

However, in my SelectedIndexChanged event handler I always get 2 for the
DropDownList SelectedIndex.

I see from the Internet that this is a constant problem but found no
solution.

Do you know what my problem might be from?



Thanks

ps I do have
AutoPostBack="true" runat="server"

on the DDL
 
C

Cal Who

Cal Who said:
<li><a href="Doc1.pdf" target="DocFrame">Doc1</a></li>

<li><a href="Doc2.htm" target="DocFrame">Doc2</a></li>

I have statements like the above.

DocFrame is an iFrame element that is inside a Div with nonzero padding
set.

For an html document that looks like a letter this put white space around
the text that looks like the margin you normally would see in a letter.

But for a pdf document it does not look good.

How can I set the padding to zero if the document is pdf?

I have no idea how to even start trying so any helpful hint would be
appreciated.
Found it. The DropDownList values must be unique!
 
G

Gregory A. Beamer

As I said it is the div (containg the iframe) that contains the
padding that puts a white margin around the iframe.

Where I am now is I'm trying a asp:DropDownList

I hope I can figure out how to set the padding on the div from a
asp:DropDownList event.

How would you do that?

I was understanding you did not want to take a roundtrip to the server.
If you are taking a roundtrip, programmatically set the padding based on
what action is being taken. Just have the DIV runat=server and
programatically set the padding.

If you want every thing to happen on the client side, you cannot merely
href target the iFrame. you have to use javascript. You can set the
padding of the DIV in the JavaScript routine. You will then open the
page using JavaScript in the targeted "window".

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
C

Cal Who

Gregory A. Beamer said:
I was understanding you did not want to take a roundtrip to the server.
If you are taking a roundtrip, programmatically set the padding based on
what action is being taken. Just have the DIV runat=server and
programatically set the padding.

If you want every thing to happen on the client side, you cannot merely
href target the iFrame. you have to use javascript. You can set the
padding of the DIV in the JavaScript routine. You will then open the
page using JavaScript in the targeted "window".

Peace and Grace,
When I first posted I had no idea how to proceed.

Thanks for your interest
 

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

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top