ContentPlaceHolder - size on Master Page

F

Fred Nelson

I'm developing my first VS2005 C# web application.

On my master page I have a "contentplaceholder" and it covers a small
portion of the screen. I can place controls anywhere on the pages that
use it however this "break" is annoying.

Does anyone know how to resize the content place holder - I've tried
everything (tables, drag&drop, etc.)

Thanks very much!

Fred
 
A

Andrew Robinson

The content place holder assumes the size of its contents. It has no size of
its own. If you want to size the contents, try wrapping your inner content
with a table of a particular size.
 
F

Fred Nelson

Andrew:

Thanks for your reply! I'm still having problems with the content place
holder.

If I place the content place holder within a table in the master page
then I am unable to use it on pages that reference it.

If I use controls that are "absoutely" placed then they can easily
extend beyond the content place holder and overwrite any text below them
- for example binding a datagrid.

So:

Do you know of a way to make the content area respond correctly
(increase vertical size) to forms that contain absoutely placed
controls?

I can't find any way - and I want to use the absoutely placed controls
since it's much faster to develop.

Thanks again - I appreciate your help!

Fred
 
A

Andrew Robinson

Not sure about the issue that you are having where you are unable to
reference the content place holder. To size the content, you should be
placing your content within a table and then that table within your content
place holder.

Putting a table around the content place holder within the master page, will
not maintain the size of the contained content place holder.

Can't comment on any of the absolute positioned controls. I never use those
properties and in general I think most sites avoid them.
 
Joined
May 18, 2006
Messages
1
Reaction score
0
Changing the size of a content placeholder

Hi Fred,
I think I can answer this, if u want to alter the size of a content placeholder just place it in a panel (available in the toolbox).hope this answers your question.
Regards,
freda
 
Joined
Oct 12, 2007
Messages
1
Reaction score
0
Hello Fred,

Put a <div> from the toolbox onto the contentplaceholder. Make sure that it is position:relative. Position:absolute will not work. When you resize the <div>, the contentplaceholder will be resized.
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top