Trixology

General Category => General Computing/Macintosh => Topic started by: Blicj11 on August 20, 2016, 02:13:37 AM

Title: HTML Tables
Post by: Blicj11 on August 20, 2016, 02:13:37 AM
Attention WeatherCat Geniuses:

I need some help with an html table. I do not want any borders to display. I have tried simply not defining borders to begin with, but they still show up. I have tried setting the border parameters to the following, still no luck.

Code: [Select]
table, th, td {
    border: 0px;
    border-collapse: collapse;
    padding: 4px;
}

The table displays fine (without borders) on a new page, but the borders show up on my weather page. I have tried moving the table to the very top of the weather page, but the borders still display, even if I do not define them at all.

My html skill are ridiculously bad and I would appreciate any of you taking a look to see what I am doing to drive myself crazy. The table is in the Today section, just below my SteelSeries Gauges.

http://timberlakesutah.com/weather/

Thanks.
Title: Re: HTML Tables
Post by: wurzelmac on August 20, 2016, 11:39:32 AM
Blick,
the best advice I can give is to check your html scripting via this W3C Validation Service (https://validator.w3.org/)! You have many closing p tags in there although they are not opened (I can see this in the mentioned table, too). So if you go step by step through the validation you will be fine at the end.
Title: Re: HTML Tables
Post by: xairbusdriver on August 20, 2016, 03:24:04 PM
Easiest way might be to add a bit of css. I assume you are using at least one css file? You can create a class with maybe nothing more than:
Code: [Select]
.borderless {border-color:transparent;} Then add
Code: [Select]
class="borderless" in the "<table...>" tag.

Or just add that "border-color:transparent;" attribute to the css you listed in your post, if you never want borders on any table!

W3C Schools almost always have some great 'exercise' spaces for most html/css/etc. on their pages. Here's one for <tables (http://www.w3schools.com/html/html_tables.asp)> that will let you 'play' for hours. [lol]
Title: Re: HTML Tables
Post by: Blicj11 on August 23, 2016, 01:41:25 AM
I am one of the few WeatherCatters who uses WordPress to maintain my site. In WordPress, you don't actually add the <p> codes. They are handled automatically by WP. For better or worse.

I have learned something though. I have two tables defined on that page and if you have a border defined for either table, they both get the border. So I believe X-Air's advise regarding CSS with two different classes of table might be the way to go.