Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

clean background and set width to 100%?

any suggestions for a clean background?

I've seen a lot of sites are using it to place ads etc and
it's not easy (for me at least) to find the css code that they use for that,
e.g.
1) http://runningnews.gr/ has this image as background http://www.runningnews.gr/bimages/2017_11_AR_SKIN1900x1050.jpg
I created a network rule in ublock to disable http://www.runningnews.gr/bimages/*
but how could I do it with css?

2) the same for this site: http://www.gtvs.gr/forum.php

I would like backgrounds removed and the container restored to 100% width

thanks in advance

Comments

  • You can try something like this

    html, 
    body { background-image:none !important; 
           width:100% !important;
           margin-left:auto !important;
           margin-right:auto !important; 
           padding-left:0 !important;
           padding-right:0 !important;
    }
    

    But every site is different, so it also may break something.

  • in the first one I'm trying to remove the skinleft, which is included in the css like this: #skin-left {
    position: absolute;
    width:125px;
    height:5700px;
    position:absolute;
    left:50%;
    margin-left:-620px;
    background-color: transparent;
    border: 0px solid yellow; }

    with:
    #skin-left {
    width:10px !important;
    }


    or display:none

    and neither works

    ok with the background
  • the whole content is included in a table element that has no class, only width=1010, can I modify that? body.table doesn't seem to work
  • With a customary adblocker installed like uBlock Origin there is no #skin-left visible.
    Nevertheless #skin-left { display:none !important; } is correct and I can't see any rule overriding it.

    As table layout is obsolete, it's not easily possible to widen everything without destroying the whole layout. It might have been, but actually they used nested tables and that's a no-no.
    Something like

    body > table,
    body > table table { width: 100% !important; }
    

    doesn't help us here.

    /edit

    This page is really archaic! It's a long time I've seen something that messy!

    /edit 2

    Of course you can select that table, as it is the third direct table ancestor of body, e.g. by
    body > table:nth-of-type(3) { background-color:red !important; }
    or for all tables with a width of 1010
    table[width="1010"] { background-color:green !important; }

  • thanks, I'm almost there with

    table[width="1010"], table[width="980"] {
    width:100% !important;
    background-image:none !important;
    }

    but there's a grey vertical line on the right that I need to remove
  • td[style^="background-image"] { background-size:contain !important; }
    or remove with display:none

  • thanks, I added td[style^="background-image"] in the initial background cleaner you gave me,
    how am I supposed to hide image?

    there are two images in td cells, how do I clear them?

    no css selector for img tag?
  • ok found that:

    img[src^="img2"] {
    display: none;
    }
Sign In or Register to comment.