Border where no border should be, Cells have borders where CSS indicates should not. |
Border where no border should be, Cells have borders where CSS indicates should not. |
Brian Read |
Aug 7 2012, 08:37 AM
Post
#1
|
Group: Members Posts: 7 Joined: 23-February 12 Member No.: 16,556 |
If you look at:
http://www.safety-lifting.co.uk/InspectDB/index.php You can see that the 2 cells on the blue area across the bottom of the page have left and right black borders, the border seems to be associated with the: <table id="BG_1330950890478_19083" width="100%" > according to firebug, however the CSS associated with it has: #BG_1330950890478_19083 { background-color: #14114e; margin:0; table,tr,td { border:0; } } Any ideas? Cheers Brian |
Frederiek |
Aug 7 2012, 09:02 AM
Post
#2
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
You have set a border for th, td in your CSS.
BTW, did you notice that the "HLS leigh logo.png" (don't use spaces in file names) spills out of the table? Caused by the height="45%" in the IMG tag. Change that to "auto" and it fits and looks better (not stretched). |
Brian Read |
Aug 7 2012, 10:30 AM
Post
#3
|
Group: Members Posts: 7 Joined: 23-February 12 Member No.: 16,556 |
You have set a border for th, td in your CSS. yes, I sort of guessed that, but I can't see where it is...and why the CSS I quoted you does not override it. QUOTE BTW, did you notice that the "HLS leigh logo.png" (don't use spaces in file names) spills out of the table? Caused by the height="45%" in the IMG tag. Change that to "auto" and it fits and looks better (not stretched). aha - yes, many thanks. As the two logo's images are not the same size, I have to reduce one of them, however I have now used the same size on the height ahd width (I'd changed one, but not the other). I'e also renamed the files with spaces in - I presume there are some browsers that do not like that? |
pandy |
Aug 7 2012, 01:20 PM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
CODE #BG_1330950890478_19083 { background-color: #14114e; margin:0; table,tr,td { border:0; } } You can't nest CSS rules. I don't know if you mean. CODE #BG_1330950890478_19083 { background-color: #14114e; margin:0; } table,tr,td { border:0; } or CODE #BG_1330950890478_19083 { background-color: #14114e; margin:0; } #BG_1330950890478_19083 table, #BG_1330950890478_19083 tr, #BG_1330950890478_19083 td { border:0; } They mean very different things. Or they should. In this case both examples would remove borders from all cells and tables, if the second version works at all, that is. You use the id 'BG_1330950890478_19083' twice. You also use it with BODY, so everything on the page is contained in an element with that id. As said above, you have done this with other IDs too. You need to clean that up. An id is supposed to be unique for a page, you can use it once and once only on the same page. This is one of the reasons why meaningful id and class names are a good idea. Makes easer to spot mistakes with your bare eyes. |
Brian Read |
Aug 7 2012, 01:28 PM
Post
#5
|
Group: Members Posts: 7 Joined: 23-February 12 Member No.: 16,556 |
CODE #BG_1330950890478_19083 { background-color: #14114e; margin:0; } #BG_1330950890478_19083 table, #BG_1330950890478_19083 tr, #BG_1330950890478_19083 td { border:0; } That's what I wanted, I'd misunderstood the CSS syntax. Tried it and it works. I take your points about the names etc, in my (slight) defense, the php includes an amalgamation of at least 2 other "packages" each of which uses CSS to format its own html, plus the fact that I generated the initial html from a template which overloaded a lot of CSS that subsequently is not used. I appreciate your comments, many thanks. Cheers Brian |
pandy |
Aug 7 2012, 02:15 PM
Post
#6
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
Remove that id from BODY or it may not work in all browsers or work in a way you don't expect.
|
Lo-Fi Version | Time is now: 30th March 2024 - 02:01 AM |