• Resolved maxpayne13

    (@maxpayne13)


    Hey everyone, please I am in desperate need of some help. So I would like to remove the padding inside the entry-content but only for one page.

    I am using google chrome and this is the exact line of code I need to change

    entry-content{overflow:visible;padding:0 20px;border-top:3px double #e5e5e5}

    all I want to do is change the 20px to zero for 1 page only.

    I added this to CSS file but no luck

    .page-id-991.entry-content{overflow:visible;padding:0 0px;border-top:3px double #e5e5e5}

    Please can anyone help?

Viewing 15 replies - 1 through 15 (of 36 total)
  • https://www.w3schools.com/css/

    try to add a space before the .entry-content class selector as this is not in the same container as the body class:

    .page-id-991 .entry-content{overflow:visible;padding:0 0px;border-top:3px double #e5e5e5}
    Thread Starter maxpayne13

    (@maxpayne13)

    hey thanks for your prompt reply, unfortunately that did not work. I will explain a bit further in more detail since I have your attention :). When I open the CSS file using notepad ++ I located this line

    entry-content{overflow:visible;padding:0 20px;border-top:3px double #e5e5e5}

    now I did not add the page number to this line or change the padding because I still want this rule to apply to all other pages, so what I did was scroll to the very end of the file (to the right in notepad++) and added this line

    .page-id-991.entry-content{overflow:visible;padding:0 0px;border-top:3px double #e5e5e5}

    I applied the space like you mentioned but still page 991 remained the same as others, the padding is still there. Not sure what to do, hopefully this makes sense.

    If the page ID is an ID (not a class) the correct CSS is #page-id not .page-id.

    Thread Starter maxpayne13

    (@maxpayne13)

    hey WPyogi,

    I actually already tried this as well

    #page-id-991.entry-content{overflow:visible;padding:0 0px;border-top:3px double #e5e5e5}

    again I added this to the very end of the line and did not edit the current rule

    entry-content{overflow:visible;padding:0 20px;border-top:3px double #e5e5e5

    Thread Starter maxpayne13

    (@maxpayne13)

    you are right its not a class, I haven’t tried with a space though. Will try it soon.

    Are you using Firebug to identify what CSS code is ACTUALLY affecting the section you are trying to change? That’s the best way to do CSS modifications.

    Thread Starter maxpayne13

    (@maxpayne13)

    hey, I am using google chrome inspection tool not firebug but trust me its def the right CSS rule. I know because after I located it I went into the CSS.style file opened, found the rule and edited the 20px to 0px and it worked but it applied it to every page. I only wanted for it to apply to a single page.

    also I’m fairly new to WP ??

    So did you get it to work?

    Thread Starter maxpayne13

    (@maxpayne13)

    I will know in about 3 hours, I will try to ad this specifically

    #page-id-991. entry-content{overflow:visible;padding:0 0px;border-top:3px double #e5e5e5}

    but not optimistic because i think I tried it before lol

    Thread Starter maxpayne13

    (@maxpayne13)

    no it did not work, this is how it looks in the file when I added it.

    #sidebar-video .byline{margin:0 0 20px 0;padding:0;font-size:10px;line-height:20px;color:#777}#page-id-991 .entry-content{overflow:visible;padding:0 0px;border-top:3px double #e5e5e5}

    Unless you include a link to your site, it’s really hard to give any real help on this.

    Thread Starter maxpayne13

    (@maxpayne13)

    sure here is the specific page too

    https://216.172.171.18/~carranza/test3/?page_id=991

    I basically placed an excel table inside the post and when I change the padding it fills in the entire space. Let em know what you think, I can send you the CSS.ctyle file too if you think that will help. Thankyou ??

    I’m not clear on what you want changed — what is inside the table or around it? If it’s the contents inside the table cells, you have to specify the <td> cells in the CSS.

    Thread Starter maxpayne13

    (@maxpayne13)

    I just want to eliminate the space between the edge of the excel table and the edge of the post container. Not sure if that is the correct term. If you are using google chrome and right click in between the space you can see that the CSS is the entry-content. You can play around with the CSS using chrome as well so i changed the padding to 0 instead of 20px and it gets rid of that space. Thing is you actually have to change it in the CSS file for it to apply because chrome doesn’t edit the CSS for you. So when I access the CSS.style file and find entry-content, the specific one I want and change it, it works fine but it applies it to every page not just the one I sent you the link for. How do I make it so I can get rid of that padding only for that specific page.

    Thread Starter maxpayne13

    (@maxpayne13)

    i still have not found a solution to this, is it possible that this theme is somehow protected in some way (I am using the news theme)or maybe there is another css preventing me from making this change?

Viewing 15 replies - 1 through 15 (of 36 total)
  • The topic ‘Change CSS for Single Page’ is closed to new replies.