Trouble with Table borders

G

Guest

Hello
I seem to have a re-occuring problem with tables.
Every tiime i create a new table in my code (Table x = new Table();) it
creates in the final code the browser gets the attribute 'border="0"'.(i
prefer putting my styles in a seprate css file)
Doesnt matter what i do, Table.Attributes.Clear(),Table.Style.Clear()
nothing seems to work.even changing the Table.BorderWidth property creates a
'style="border-width:x"' and stucks me with the 'border="0"'.
It happens even when i create classes derived from Table.

Please help me,it's really annoying.
Thank you.
 
K

Karl Seguin [MVP]

It's hard-coded in the table creation - unfortunetly. But I don't see why
it'd be causing problems with your css decleration? if you do

<table border="0" class="Blah"> and the Blah class defines a border, it
ought to apply it reguarless of what the border says..

Karl
 
F

Flinky Wisty Pomm

It's hard-coded in the table creation - unfortunetly. But I don't see why
it'd be causing problems with your css decleration? if you do
<table border="0" class="Blah"> and the Blah class defines a border, it
ought to apply it reguarless of what the border says..

Not true, CSS properties are overriden by inline styles. Not very
helpful, I know.
 
K

Karl Seguin [MVP]

Well, I'm willing to admit that i'm wrong...but...

I agree that external css properties are overriden by inline styles, but
border="0" isn't an inline style, it's an attribute decleration which ARE
overriden by any styles (inline or external).

so if you do:
<table border="0">
<tr><td>asdsa</td></tr>
</table>

and you create a style in a css:

table
{
border:1px solid #000;
}

you WILL see the border

Karl
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top