Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS First line of Paragraph is automatically centered!

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #245073
    Ahmed Elgameel
    Participant

    Hi guys!
    After doing some CSS changes to my style using Edit CSS in WordPress, the 1st line of Comments is automatically centered and I can’t solve the problem.

    Example of the problem: https://wp-me.com/best-free-wordpress-slider-plugins/#comment-890

    Could you please give me a CSS code to solve the problem?

    Thanks in Advance!

    #245091
    giudev
    Participant

    Should be a floating problem, clear left or both should fix the problem.

    #245092
    Beverleyh
    Participant

    After doing some CSS changes to my style using Edit CSS in WordPress, the 1st line of Comments is automatically centered and I can’t solve the problem.

    Can you restore from a backup (ideally you should make a backup before any change) or “unpick” what you did from memory?

    Could you please give me a CSS code to solve the problem?

    I can’t see much on mobile, but you can help yourself a great deal by learning to use the developer console – F12 in most browsers. With it you can inspect an element and edit applied styles on the fly, live in the browser, before transferring changes to the stylesheet. It’s great for troubleshooting your own code.

    If you need more help, show us what you’ve tried in a reduced CodePen demo. It’s much easier for us that way (we prefer not to go poking around hundreds of elements and assets in unknown territory) and the exercise of hiving off just enough markup and CSS to illustrate the problem, will often help you identify the problem yourself.

    #245095
    Paulie_D
    Member

    Not sure why but I think it’s a margin issue

    p {
        margin: 0 0 28px; /* delete this  */
        padding: 0;
    }
    
    #245101
    Ahmed Elgameel
    Participant

    Thanks for help guys.
    Actually the problem was with margin in the line that @Paulie_D mentioned and I knew that before posting the issue here, and I’ve deleted the line but the problem was with CloudFlare and my .htaccess code for caching so whenever I try to preview changes the old style.css file loads from browser’s caching and when I delete cache or visit the website from new browser or PC the old file loads from CloudFlare and replaces the new style.css file.
    When I disabled CloudFlare and cleared the browser cache it works now!

    <css>
    p {
        margin: 0 0 28px; /* theproblem was in this line  */
        padding: 0;
    }
    
    /*The new code is */
    
    #wpcomm .wc-comment-text p {
        margin-bottom: 10px;
        margin-left: 0 !important;
    }
    </css>
    

    https://codepen.io/AhmedElgameel/pen/PGoNdd

    Thanks for help!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.