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 1 of 2 1 2 LastLast
Results 1 to 10 of 20
  1. #1
    Member az0000000's Avatar
    Join Date
    Feb 2005
    Location
    Moldova, Chisinau
    Posts
    57
    Member #
    9033
    Hello.
    I am using FrontPage for web design. I used to add 1 pixel, solid borders to certain table [not all tables on the page] or to parts of tables using FrontPage, but noticed that these borders are only visible in Internet Exlporer, while in other browser like Opera or Mozilla you wouldn’t see those borders. My question is how can I add cross-browser table borders so that it could be seen in all browsers or at least in many of them I guess it is done through css script, but I guess there could be easier way.
    Any suggestion will be appreciated.
    Thank you.
    The beat never fades!

  2.  

  3. #2
    Senior Member Trico's Avatar
    Join Date
    Feb 2004
    Location
    Nottingham, UK
    Posts
    894
    Member #
    5081
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>CSS Border</title>
    <style type="text/css" media="screen">
    .border, td {
         
    	 border: 1px solid #000;
    	 border-collapse: collapse;
    	 	 
    }
    </style>
    </head>
    <body>
    <table width="750" cellpadding="0" cellspacing="0" border="0" class="border">
      <tr> 
        <td width="375" height="550">blah</td>
        <td width="375" height="550">blah</td>
      </tr>
    </table>
    </body>
    </html>

  4. #3
    Member az0000000's Avatar
    Join Date
    Feb 2005
    Location
    Moldova, Chisinau
    Posts
    57
    Member #
    9033
    Hello.
    Thank you for help.
    If i understand right that is a .css style? If so, could you please tell me how to apply it, as i want to add 1px border style to only certain tables on the page. If i add this .css to entire page all tables will have that style right?
    Thanks.
    The beat never fades!

  5. #4
    Junior Member
    Join Date
    Dec 2004
    Posts
    9
    Member #
    8527
    Try This
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>CSS Border</title>
    <style type="text/css" media="screen">
    </head>
    <body>
    <table width="750">
    <tr>
    <td width="375" height="550">blah</td>
    <td width="375" height="550">blah
    <table width="100%" height="100%" border="1" cellpadding="0"class="border">
    <tr>
    <td>&nbsp;</td>
    </tr>
    </table></td>
    </tr>
    </table>
    </body>
    </html>

  6. #5
    Member az0000000's Avatar
    Join Date
    Feb 2005
    Location
    Moldova, Chisinau
    Posts
    57
    Member #
    9033
    Thank you.
    I will be trying.
    The beat never fades!

  7. #6
    Senior Member Trico's Avatar
    Join Date
    Feb 2004
    Location
    Nottingham, UK
    Posts
    894
    Member #
    5081
    My CSS has gone a little rusty recently, but as with all trial and error I seem to have come up with atleast a working example that you can use.

    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

  8. #7
    Member az0000000's Avatar
    Join Date
    Feb 2005
    Location
    Moldova, Chisinau
    Posts
    57
    Member #
    9033
    Thank you very much, i will try!
    The beat never fades!

  9. #8
    Member az0000000's Avatar
    Join Date
    Feb 2005
    Location
    Moldova, Chisinau
    Posts
    57
    Member #
    9033
    Now I start getting it, thanks. Worked out nice for me.
    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.
    Thank you. :rambo:
    The beat never fades!

  10. #9
    Member az0000000's Avatar
    Join Date
    Feb 2005
    Location
    Moldova, Chisinau
    Posts
    57
    Member #
    9033
    Hi Trico.
    Waiting patiently for your help
    The beat never fades!

  11. #10
    Senior Member jbagley's Avatar
    Join Date
    Sep 2004
    Location
    Cape Town
    Posts
    845
    Member #
    7422
    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?


Page 1 of 2 1 2 LastLast

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 10:31 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com