Loosing css?

M

MA

Hi all!

I have a problem with my datagrid and css.

To fill my grid, I have a database connection. The sql is partly built from
drop down lists (select * from myTable where id='ddl value'.

My problem is, that when I select something in my drop down and the page
reloads, there seems to be some odd spacing around the controls in the
cells.

I have set padding (left, right, bottom, top), cellpadding and cellspacing
to 0px but I can´t get ridd of it.

Im out of ideas here :(

Do you have any?

/Marre
 
E

Eliyahu Goldin

How are you laying the controls out? Are using Flow Layout? Using html
tables is the best way of keeping consistent layout when page changes.

Eliyahu
 
M

MA

Well, it´s inside the grid cell.
Lets say i have two rows in a cell. After the postback, the space between
those rows are bigger. I´m confused ;)

/Marre
 
K

Ken Cox [Microsoft MVP]

Could you show us a sample of the HTML that is rendered? It is possible that
ASP.NET is inserting a SPAN tag that needs to be accounted for.
 
M

MA

Hi!

Sorry for not answering erlier.
A gridcell looks like this after a postback:
<td><nobr><div class='calendar_cell' title='text: text
text1: 1
text2: 2
text3: 3
text4: 4
--------------------------------------------
' alt='text: text
text1: 1
text2: 2
text3: 3
text4: 4
--------------------------------------------
'>my text 1</div></nobr><nobr><div class='calendar_cell' title='text: text
text1: 1
text2: 2
text3: 3
text4: 4
--------------------------------------------
' alt='text: text
text1: 1
text2: 2
text3: 3
text4: 4
--------------------------------------------
'>my text 2</div></nobr></td>

As you can see, there is a lot of text inside the title and alt. But this
text is there even before the postback.

I have tried to put this text in my calendar_cell-class:
..calendar_cell

{

cellpadding: 0px;

cellspacing: 0px;

padding: 0px 0px 0px 0px;

padding-bottom: 0px;

padding-left: 0px;

padding-right: 0px;

padding-top: 0px;

}

But it?s not working at all!



/Marre
 

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

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top