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

G

Guest

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
 
G

Guest

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

Greg9Strat

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></p> tags injected by the designer...
these add spaces
 
G

Guest

Thanks for the advice. I checked...and the table cellpadding and cellspacing
were set to 1. I set to "0" and the problem remains.
 
G

Guest

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 <p> tags or breaks or anything.
- I reviewed the source again...even ran through the File Compare
utility....and no differences!
 
A

Alan Silver

dw said:
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
 

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,995
Messages
2,570,231
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top