473,396 Members | 1,938 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Trouble with Table borders

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.
Feb 13 '06 #1
4 1114
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
--
http://www.openmymind.net/

"ThePinkPanther" <Th************@discussions.microsoft.com> wrote in message
news:E9**********************************@microsof t.com...
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.

Feb 13 '06 #2
> 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.

Feb 13 '06 #3
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
--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Flinky Wisty Pomm" <Pa********@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
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.

Feb 13 '06 #4
Object withdrawn :)

Always happy to be proven wrong.

Feb 13 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

61
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
12
by: Rick DeBay | last post by:
I'm trying to create a layout table, where the spacing between rows varies. I've tried using setting margin-top and border-top for the rows I wan't spaced down from the one above, and I've also...
4
by: David Ross | last post by:
In my <http://www.rossde.com/inflation.html>, I have a small table in the middle of the page. This page is composed without a DOCTYPE statement at the beginning. The table borders appear to my...
7
by: CheGueVerra | last post by:
First of all Hello all you css freak. geeks and gurus. I just started using css for some web pages I had to do at work and I'im testing some stuff at home to understand more. Now, I wanted to...
7
by: Bob Bedford | last post by:
I've an image in a cell of a table. I've this CSS: ..dbtable{ width: 600px; padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px; border-collapse: collapse; border: 1px solid #000000;
1
by: sam | last post by:
Hi, I want to use style on the grids of table. Currently it use default style of the html table, in which the grid size appeared very thick. How can I change the "thick" style of the default...
11
by: Norman L. DeForest | last post by:
Am I misunderstanding the CSS specifications or is Firefox (version 1.0.6) (and Opera) doing the wrong thing? It appears that Firefox 1.0.6 includes the border in width calculations for tables...
2
by: Bernt Fischer | last post by:
Hello I want to render a datagrid with transparent borders (cellspacing = 1) so the underlying background shines through. Unfortunately, ASPNET renders the <table> tag with a 'rules="all"...
10
by: phil-news-nospam | last post by:
I have a table with 3 columns in 1 row. I want to increase the spacing _between_ the columns (gutter) _without_ increasing the spacing between those columns and the table itself. Is there a way...
5
by: sitko | last post by:
Hi, I'm done a little HTML here and there over the years...but nothing professionally. Now I'm working on a project which calls for some simple HTML. Here is my markup, for the life of me I can't...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.