Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 2 of 2 FirstFirst 1 2
Results 11 to 20 of 20
  1. #11
    Member az0000000's Avatar
    Join Date
    Feb 2005
    Location
    Moldova, Chisinau
    Posts
    57
    Member #
    9033
    Quote Originally Posted by jbagley
    So all you want is the css code that will apply only a border to the table and no text changes etc? Is that what you asking?
    Seems like yes. And not only that. I would like to apply a border only to a certain table on the page not to all tables. Usually when i insert a css in a page with intension to apply border only to a certain table a sad think is hapenning, css that i insert automatically will add border to all tables in the page, thus making a total mess of my entire content. So i was wondering how to apply a border to a certain table using css and avoid that problem of messing entire content...?
    Thanks.
    The beat never fades!

  2.  

  3. #12
    Senior Member Trico's Avatar
    Join Date
    Feb 2004
    Location
    Nottingham, UK
    Posts
    894
    Member #
    5081
    I have a question, what code should have a css that would apply a border only to a table without specifying any other parameters like text size, style inside the table or table's length for example, only add a border.
    Why do I have this feeling that you haven't read what I've said??

    Yes you're right, it uses CSS (cascading style sheets) to control the border. There're two main .classes involved.

    By appending either ...class="border"> or ...class="null"> as an attribute of your <table> tag you will be able to specify which tables should use a border and which should not. On/Off

    The class="(name)"> is what links the CSS to the HTML.

    I've updated the example I posted earlier, you can download it and have a look at it in more detial. (see attachment at the end of this post) There're two tables demonstrating both states, hit (Ctrl+A) on the page once it's open in a web browser to see.

    Trico
    - Trico

  4. #13
    Member az0000000's Avatar
    Join Date
    Feb 2005
    Location
    Moldova, Chisinau
    Posts
    57
    Member #
    9033
    Quote Originally Posted by Trico
    Why do I have this feeling that you haven't read what I've said??



    - Trico
    I read all your explanations very well and I tried the css you made for me as well. It worked fine, thanks, but I feel like you haven't read my reply too...
    When I added the css you nicely created for me to my page (in finished state with all content and lots various tables on it) it made a total mess as absolutely ALL tables on that page automatically got that 1px border. Even if I didn't add a "class="border">" switch to each of them still all borders got that 1px border. So seems like after that I will have to manually go from table to table and add a "class="null">" switch that will turn of the 1 px border on all tables except the one I need with border... That's kin of weird job... if I have table all over the page...
    And besides, the css you created not only adds a 1px border, but also changes the size of the table, the style of text inside that table and so on, while I would like to only add border, and only to a certain table not to all at once when i insert the css into the page.
    How to solve that?
    Thank you for help again.
    The beat never fades!

  5. #14
    Senior Member jbagley's Avatar
    Join Date
    Sep 2004
    Location
    Cape Town
    Posts
    845
    Member #
    7422
    Woah. Its getting pretty heated in here.

    Im guessing az00000000, you dont know HTML and CSS to well. Why dont you give us the link to the site, so we can have a look, and maybe solve it that way.

  6. #15
    Senior Member Trico's Avatar
    Join Date
    Feb 2004
    Location
    Nottingham, UK
    Posts
    894
    Member #
    5081
    I never said it was the most efficient means of acheiving the desired result, but it works. I also mentioned the only two important classes were .null and .border so you're welcome to remove everything else from the CSS as that was purely to format my example.

  7. #16
    Member az0000000's Avatar
    Join Date
    Feb 2005
    Location
    Moldova, Chisinau
    Posts
    57
    Member #
    9033
    Quote Originally Posted by jbagley
    Woah. Its getting pretty heated in here.

    Im guessing az00000000, you dont know HTML and CSS to well. Why dont you give us the link to the site, so we can have a look, and maybe solve it that way.
    Yeah, I am not a guru in HTML or CSS but I think I solved the problem other way. I used a simple HTML trick to make my 1px bordered table cross-browser compatible.
    If ya still wanna look, it is here: http://www.serviciupentrupace.org
    See some tables with 1px border. I am proud to say, those tables are universal.
    The beat never fades!

  8. #17
    Member az0000000's Avatar
    Join Date
    Feb 2005
    Location
    Moldova, Chisinau
    Posts
    57
    Member #
    9033
    Quote Originally Posted by Trico
    I never said it was the most efficient means of acheiving the desired result, but it works. I also mentioned the only two important classes were .null and .border so you're welcome to remove everything else from the CSS as that was purely to format my example.
    Yeah, from this point of view I think you made a pretty nice css, so I thank you for help. As you suggest I will try to remove all other formatting from css except formatting that adds 1px border.
    I used a simple HTML option to fulfil my task.
    If you r interested here is the simple code:

    <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
    <tr>
    <td><table width="100%" border="0" cellpadding="1" cellspacing="1">
    <tr bgcolor="#FFFFFF">
    <td>&nbsp;</td>
    </tr>
    </table></td>
    </tr>
    </table>

    This is not my code of course I am just learning
    Thanks.
    The beat never fades!

  9. #18
    Senior Member Physt's Avatar
    Join Date
    Jul 2004
    Posts
    255
    Member #
    6655
    You should really learn CSS as it is becoming the main method for positioning and all layout.. It is very easy and very logical.. So it should be easy to pick up..

    http://www.w3schools.com -- Click on CSS in the menu.

    http://www.csszengarden.com
    http://www.cssvault.com ^-- These are some sites created with CSS

    CSS is MUCH easier and more logical than table based designs, plus the code is smaller, the pages are faster and there are many other advantages..
    www.controlalternate.com - Web resources and free templates. www.chaosconcepts.net - Custom web and graphic design.
    www.blog.chaosconcepts.net - My Blog

  10. #19
    Member az0000000's Avatar
    Join Date
    Feb 2005
    Location
    Moldova, Chisinau
    Posts
    57
    Member #
    9033
    Quote Originally Posted by Physt
    You should really learn CSS as it is becoming the main method for positioning and all layout.. It is very easy and very logical.. So it should be easy to pick up..

    http://www.w3schools.com -- Click on CSS in the menu.

    http://www.csszengarden.com
    http://www.cssvault.com ^-- These are some sites created with CSS

    CSS is MUCH easier and more logical than table based designs, plus the code is smaller, the pages are faster and there are many other advantages..
    Thanks, sites are good, may be i'll learn...
    Thanks.
    The beat never fades!

  11. #20
    Member az0000000's Avatar
    Join Date
    Feb 2005
    Location
    Moldova, Chisinau
    Posts
    57
    Member #
    9033
    I would like to find out also how to add same 1 px border to a cell, so when I insert a new row to the table it would automatically have the needed 1 px border, like the way tables are in Exel for example.
    The beat never fades!


Page 2 of 2 FirstFirst 1 2

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

add a 1 pixel solid border to certain table

Click on a term to search for related topics.
All times are GMT -6. The time now is 11:49 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com