Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

adding some style to tables in php

Options
  • 27-02-2008 4:20pm
    #1
    Closed Accounts Posts: 51 ✭✭


    hey guys
    hope everyone is keeping well
    i have tables printing out in a horrbile bland manner, here take a look:

    screensi6.th.png

    there horrible, i need to make them much much more stylish, can anyone suggest a style to me, and a way of going about getting them to work!

    thanks for the help,


Comments

  • Registered Users Posts: 2,534 ✭✭✭FruitLover


    You want to learn CSS.


  • Closed Accounts Posts: 51 ✭✭poissys


    FruitLover wrote: »
    You want to learn CSS.

    i have some nice css table templaste that i got here
    got them here: http://icant.co.uk/csstablegallery/
    but i dunno how to integreate them into a html page.
    any ideas?


  • Registered Users Posts: 32,136 ✭✭✭✭is_that_so


    You always start by going into your own tables and setting all borders="0".

    For CSS for example you would do this
    in the <head> section of your page.
    <style>
    
    td
    {
    	border: 1px dotted #fff;
    	padding: 0 2px;
    }
    </style>
    
    

    or you could just save a separate css file and put the following in your <head> section.
    <link rel="stylesheet" type="text/css" href="css name" />
    

    So when you draw a table in the <body> it would set that style to the <td> you have added above.


    http://www.w3schools.com/css/css_table.asp is a good place to start on it.


  • Registered Users Posts: 9,579 ✭✭✭Webmonkey


    http://icant.co.uk/csstablegallery/

    Lovely ones there :) - you making progress I see

    Click on the Table Design name links on the left on each row. You can download the CSS for the table, tr, th etc but you must manually grab the table images if they have them either by manually typing address in address bar or getting them from browser cache.


    Edit - doh, never read your last post, you found it.

    Steps
    Open notepad, copy /paste the CSS you download from the site into it. Save it in same location as your website something like style.css. (Make sure it doesn't get saved as txt file, click all files for the file type).

    Now you must attach it to your page.

    Copy:
    <link rel="stylesheet" type="text/css" href="style.css" />
    
    between the <head></head> tags in your page. Your tables should automatically get the style.

    Now if you already use tables on the site, this could be problematic as other table formatting will end up with same styles and it will look scary :)


  • Closed Accounts Posts: 51 ✭✭poissys


    thanks for that donal, il give it a go there now!! :)
    ya making progress, the site is nearly done, being onest this is pretty much teh last thing now, so i mhappy!
    thansks again bud ;)
    Webmonkey wrote: »
    http://icant.co.uk/csstablegallery/

    Lovely ones there :) - you making progress I see

    Click on the Table Design name links on the left on each row. You can download the CSS for the table, tr, th etc but you must manually grab the table images if they have them either by manually typing address in address bar or getting them from browser cache.


    Edit - doh, never read your last post, you found it.

    Steps
    Open notepad, copy /paste the CSS you download from the site into it. Save it in same location as your website something like style.css. (Make sure it doesn't get saved as txt file, click all files for the file type).

    Now you must attach it to your page.

    Copy:
    <link rel="stylesheet" type="text/css" href="style.css" />
    
    between the <head></head> tags in your page. Your tables should automatically get the style.

    Now if you already use tables on the site, this could be problematic as other table formatting will end up with same styles and it will look scary :)


  • Advertisement
Advertisement