Skip to main content

Forums

This topic contains 17 replies, has 0 voices, and was last updated by  Crssp 6 years, 4 months ago.

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #44223

    Crssp
    Participant

    I can’t figure out what’s creating the padding at the top of the main content area above the Latest News Ticker.

    http://tinyurl.com/bv45hdu

    Wordpress Twenty Twelve theme has a bit of Class-itis me thinks, but it’s the theme plugged in at the moment (not a fan).
    Trying to eliminate the space above and below the ticker, besides the ticker itself having padding properties, etc. I think it’s the theme attributes giving me troubles though.

    I’ve tried 20 or more smackdown methods, nothings working. :(

    #132342

    wolfcry911
    Participant

    line 579

    .site-content {
    margin: 1.71429rem 0 0;
    }

    #132343

    ChrisP
    Participant

    @Crssp, my first guess is the empty `p` tags and line breaks you have in the page.

    #132344

    TheDoc
    Moderator

    @ChrisP hit the nail on the head. There’s an empty `

    ` tag sitting there: http://cl.ly/image/0q2B3h0J2r2W

    #132345

    Crssp
    Participant

    This reply has been reported for inappropriate content.

    Oh man, that’s what I get for editing my bosses work, and he’s got extra p tags… nice…
    there’s always p: dislay: none;
    thanks guys.

    #132346

    Crssp
    Participant

    This reply has been reported for inappropriate content.

    It could be the ditty news scroll plugin tossing in the p tags, if it’s even that tough.
    Thanks again.

    #132347

    ChrisP
    Participant

    @Crssp, giving your `

    ` tags a `display: none;` value will leave you with 0 content..aside from that, @thedoc‘s screenshot shows that the problem is your ticker is _inside_ a `

    ` tag, which would make your ticker disappear completely.

    > It could be the ditty news scroll plugin tossing in the p tags, if it’s even that tough. Thanks again.

    It’s someone getting “return happy” in the visual editor of WP..just switch it to HTML and delete excess `p` and `br` tags.

    #132348

    Crssp
    Participant

    This reply has been reported for inappropriate content.

    Aware of the p display none it was a joke.
    although I was stoked when I took down a site today with an awesome wildcard line of code:
    * { display:none }

    #132349

    Crssp
    Participant

    This reply has been reported for inappropriate content.

    Actually the only thing in the editor, sitting at the very top is the shortcode:
    [ditty_news_ticker id=”315″]
    Getting a little bit trickier, for css-tricks fans, :)

    #132350

    ChrisP
    Participant

    > Aware of the p display none it was a joke.

    Glad to hear it..lol sarcasm is hard to read

    #132351

    Crssp
    Participant

    This reply has been reported for inappropriate content.

    It was a great help Chris, I was so busy looking at all the ID’s and .classes, it totally got by me, when looking at the code.
    Fresh eyes are good :)

    #132352

    Crssp
    Participant

    Anybody have a suggested fix for WordPress adding P tags, especially when it’s the first thing in the editor?
    First google brought me to this functions file snippet:

    http://sww.co.nz/solution-to-wordpress-adding-br-and-p-tags-around-shortcodes/

    Really not sure now.

    #132354

    Crssp
    Participant

    Never had a use for:

    p:first-child rule
    …but that’s a thought, even though the p tag shouldn’t be there.

    #132356

    Crssp
    Participant

    @ChrisP> It’s someone getting “return happy” in the visual editor of WP..just switch it to HTML and delete excess p and br tags.
    The P tags are not there, in the html view, they are getting parsed in some how, whether it’s js of the plugin or just WP auto P’s….

    #132357

    ChrisP
    Participant

    @Crssp, I think the link you had earlier is the ticket.

    > http://sww.co.nz/solution-to-wordpress-adding-br-and-p-tags-around-shortcodes/

    I don’t really make much use of shortcodes so I don’t have much experience..

    I think your `:first-child` option could be a possibility too. The only problem is the pages that _don’t_ have a shortcode would be affected too. You could always add a body class..like `.home` for this page, then target the shortcode using `.home .entry-content p:first-child { margin: 0 }`

    That would definitely be a hack-y solution though..

Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in to reply to this topic.

icon-link icon-logo-star icon-search icon-star