- This topic is empty.
-
AuthorPosts
-
April 18, 2013 at 2:22 pm #44223
Crssp
ParticipantI can’t figure out what’s creating the padding at the top of the main content area above the Latest News Ticker.
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. :(
April 18, 2013 at 2:42 pm #132342wolfcry911
Participantline 579
.site-content {
margin: 1.71429rem 0 0;
}April 18, 2013 at 2:43 pm #132343ChrisP
Participant@Crssp, my first guess is the empty `p` tags and line breaks you have in the page.
April 18, 2013 at 2:46 pm #132344TheDoc
Member@ChrisP hit the nail on the head. There’s an empty `
` tag sitting there: http://cl.ly/image/0q2B3h0J2r2W
April 18, 2013 at 2:50 pm #132347ChrisP
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.
April 18, 2013 at 2:59 pm #132350ChrisP
Participant> Aware of the p display none it was a joke.
Glad to hear it..lol sarcasm is hard to read
April 18, 2013 at 3:03 pm #132352Crssp
ParticipantAnybody 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.
April 18, 2013 at 3:16 pm #132354Crssp
ParticipantNever had a use for:
p:first-child rule
…but that’s a thought, even though the p tag shouldn’t be there.April 18, 2013 at 3:30 pm #132356Crssp
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….April 18, 2013 at 3:36 pm #132357ChrisP
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..
April 18, 2013 at 3:51 pm #132362Crssp
ParticipantThanks again ChrisP, I’m hesitant to do anything with the functions.php on this one, not entirely understanding the overall results.
Attempting the hack-y CSS still no love. :(April 25, 2013 at 1:00 pm #133164Crssp
ParticipantThis problem reared it’s ugly head on another project… found a fix this time via a Functions file php body blow to the mid-section:http://www.simonbattersby.com/blog/2011/02/wordpress-wrapping-shortcodes-with-p-tags/
Setting up Post Snippets for Grid Columns in the venerable Skelton Theme from simplethemes, and this worked a charm!
function simonbattersby_shortcode_format($content){
$content = preg_replace(‘/()s*(
$content = preg_replace(‘/()s*()/’, ‘‘, $content);
return $content;
}add_filter(‘the_content’,’simonbattersby_shortcode_format’,11);
April 25, 2013 at 1:06 pm #133167Crssp
ParticipantWait a minute, now I’m getting break tags instead of the p opening tag, and a break for the P closing tag. :(
So I’m still rattling on here… :( -
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.