472,125 Members | 1,404 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,125 software developers and data experts.

Help w/extra space between controls (and i don't want the space)

dw
hello -

first, let me state that i am an Asp.Net rookie.

here is the situation:
i have a page that looks good in the vs.net designer, but when the page
renders there are extra amounts (vertically) of space between controls. i
have all of the controls in a table, to help line them up, and I have
reviewed the html to verify that there are no extra spaces or paragraphs or
breaks between the controls. however, when i run the web site, the controls
have extra spacing.

is there anything i can check or look at to help with this?

thanks
- will
Jul 23 '06 #1
5 1847
Have you set the cellpadding and cellspacing and border properties of your
table to 0 (eg: <table cellpadding="0" cellspacing="0" border="0">)?

"dw" wrote:
hello -

first, let me state that i am an Asp.Net rookie.

here is the situation:
i have a page that looks good in the vs.net designer, but when the page
renders there are extra amounts (vertically) of space between controls. i
have all of the controls in a table, to help line them up, and I have
reviewed the html to verify that there are no extra spaces or paragraphs or
breaks between the controls. however, when i run the web site, the controls
have extra spacing.

is there anything i can check or look at to help with this?

thanks
- will
Jul 24 '06 #2
Things to try (if you haven't already):

- try viewing your page in different browsers to see if they all
exhibit this behavior; if it's only one browser, then you might want to
weigh the pro's & con's of spending time to fix...
- try deleting all spaces and line breaks in the source for those
controls that are giving you a difficult time (line the tags in your
source up on one line, rather than hitting return to make the code look
good...) (I'll admit, this isn't 'good technique', but I've had ASP.NET
do things that are very bizarre...)
- ensure that there were no <p></ptags injected by the designer...
these add spaces


dw wrote:
hello -

first, let me state that i am an Asp.Net rookie.

here is the situation:
i have a page that looks good in the vs.net designer, but when the page
renders there are extra amounts (vertically) of space between controls. i
have all of the controls in a table, to help line them up, and I have
reviewed the html to verify that there are no extra spaces or paragraphs or
breaks between the controls. however, when i run the web site, the controls
have extra spacing.

is there anything i can check or look at to help with this?

thanks
- will
Jul 24 '06 #3
dw
Thanks for the advice. I checked...and the table cellpadding and cellspacing
were set to 1. I set to "0" and the problem remains.

"GarthS" wrote:
Have you set the cellpadding and cellspacing and border properties of your
table to 0 (eg: <table cellpadding="0" cellspacing="0" border="0">)?

"dw" wrote:
hello -

first, let me state that i am an Asp.Net rookie.

here is the situation:
i have a page that looks good in the vs.net designer, but when the page
renders there are extra amounts (vertically) of space between controls. i
have all of the controls in a table, to help line them up, and I have
reviewed the html to verify that there are no extra spaces or paragraphs or
breaks between the controls. however, when i run the web site, the controls
have extra spacing.

is there anything i can check or look at to help with this?

thanks
- will
Jul 24 '06 #4
dw
Thanks for the suggestions.
- I viewed the page in Firefox (normally we use only IE) and the page
rendered the same in both browsers
- There were not extra <ptags or breaks or anything.
- I reviewed the source again...even ran through the File Compare
utility....and no differences!

"Greg9Strat" wrote:
Things to try (if you haven't already):

- try viewing your page in different browsers to see if they all
exhibit this behavior; if it's only one browser, then you might want to
weigh the pro's & con's of spending time to fix...
- try deleting all spaces and line breaks in the source for those
controls that are giving you a difficult time (line the tags in your
source up on one line, rather than hitting return to make the code look
good...) (I'll admit, this isn't 'good technique', but I've had ASP.NET
do things that are very bizarre...)
- ensure that there were no <p></ptags injected by the designer...
these add spaces


dw wrote:
hello -

first, let me state that i am an Asp.Net rookie.

here is the situation:
i have a page that looks good in the vs.net designer, but when the page
renders there are extra amounts (vertically) of space between controls. i
have all of the controls in a table, to help line them up, and I have
reviewed the html to verify that there are no extra spaces or paragraphs or
breaks between the controls. however, when i run the web site, the controls
have extra spacing.

is there anything i can check or look at to help with this?

thanks
- will

Jul 24 '06 #5
In article <CA**********************************@microsoft.co m>, dw
<dw@discussions.microsoft.comwrites
>hello -

first, let me state that i am an Asp.Net rookie.
Doesn't matter, this sounds more like an HTML problem, albeit one
probably caused by the IDE.
>here is the situation:
i have a page that looks good in the vs.net designer, but when the page
renders there are extra amounts (vertically) of space between controls. i
have all of the controls in a table, to help line them up,
Side issue, but you shouldn't be doing this. There was an excuse for
using tables for layout maybe seven or eight years ago, but nowadays
there's no excuse for it. Use CSS and you will see significant benefits.
Search Google for web design standards and read up a bit and you'll see
what I mean.
and I have
reviewed the html to verify that there are no extra spaces or paragraphs or
breaks between the controls. however, when i run the web site, the controls
have extra spacing.
Look at the source that is produced. Are there spaces or line breaks
there? Many browsers incorrectly treat these are real space and move
other elements apart.
>is there anything i can check or look at to help with this?
Maybe post some of the HTML. Just a small sample that exhibits the
problem. Can't really diagnose it without seeing some code.

Also, check you are in standards mode not quirks mode as that can affect
how the browser renders your page. Again, search Google for info if you
don't know what this means.

HTH
>thanks
- will
--
Alan Silver
(anything added below this line is nothing to do with me)
Jul 30 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by mappo | last post: by
2 posts views Thread by Steve K | last post: by
28 posts views Thread by stu_gots | last post: by
6 posts views Thread by michaelzap | last post: by
1 post views Thread by Rahul | last post: by
8 posts views Thread by dancer | last post: by
32 posts views Thread by =?Utf-8?B?U2l2?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.