Uutiset:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu
Advertisement:

table background?

Aloittaja mack420, tammikuu 31, 2020, 05:34:25 IP

« edellinen - seuraava »

mack420

ok, so i am wondering how to change the default background for tables you create in posts and let me further explain what I mean

I know you can't do when making a new post

I was wondering if there is a edit in the code for the forum template to change the default background for creating new tables as I currently see a white background in tables I create in posts

I just want to be able to match the background color of my forum which is black

is that possible or not?

I hope someone can understand what I mean

drewactual

add to the bottom of your theme's CSS file:


table.post, th.post, tr.post, td.post {background:#000;}


^as a starting point.

mack420

ok, i added it to the bottom of my theme's css file. that would be index.css, right?

mack420

is there more to do? the background color is still white

drewactual

hold shift hit refresh... you may have cached css playing a role.

drewactual

actually, just use:

td.post{background:#000}

td being 'cell'... tr being 'row'... table, obviously, being the whole table... th being 'table header' which i don't think SMF uses in its default form though some themes may use it?

just 'td' ought to do the trick...

the #000 is short hex for black...

mack420


mack420

when you said add it as a starting point, what did you mean?

drewactual

once you get control of it, you can adjust the css...

post a link to a thread with a table, i'll take a look.

mack420

get control of it?

I added the line you gave me and saved it and it didn't work

here is a link to a thread with a table in it

http://sefwun.com/forum/index.php?topic=4374.msg6072#msg6072

drewactual

open up a incognito tab in your browser and look... it has a black background.  however, your font is also black which hides it. 

change the line i offered to this:

td.post{background:#000;color:#fff;}

your cache is holding on to your OLD css... get a fresh copy of your css, if using chrome, firefox, or edge, by holding teh shift key and hitting refresh.

mack420

i've tried holding the shift key and hitting refresh, both ways by using the F5 buttton and clicking the refresh symbol in the browser.

I am using Torch browser and have tried pale moon and comodo dragon browsers with the same result, the background is white

i tried clearing the cache in my browser and shutting it down and opening it back up, still white

drewactual

black on chrome and firefox.  see attached.


drewactual

now listen to me....

look at the attached... look at the last thing on the bottom... it is:

td.post{background:#000;color:#fff;}

your font is black and so is the background color so you can't see it, which is why 'color:#fff (or white)" was added... now that you'e 'got a hold of it' using td.table div class command, and changed the colors- now, play with it until you like it. 

mack420

not worried about the font color being black, i made it black because of white background

i cleared my cache, cookies, browsing history, and i got signed out, saw a black background, signed in and it was white again. i tried clearing just my cach and stayed signed in, still white?????

drewactual

yeah, you've got a cache issue somewhere.. it may be on your end, or it could be somewhere you have no hope to change such as an ISP's... they seem to cache to make things look faster and to reduce bandwidth... it's super frustrating...

give it an hour or so... maybe a couple hours... it'll be picked up soon.

mack420

should i try disconnecting my pc from the internet or restarting my pc?

i think i had to restart my pc once before over a cache issue, maybe i'll just try it?

drewactual

probably a good idea to remove something on your end from the equation...

mack420

i restarted my pc, no help

any ideas???

mack420

or rather than ideas, solutions???

Advertisement: