Community Forums › Forums › Archived Forums › Design Tips and Tricks › Genesis 1.9 Child – Post-Info, Post-Meta Problem
- This topic has 10 replies, 3 voices, and was last updated 11 years, 3 months ago by RonnyMac.
-
AuthorPosts
-
January 12, 2013 at 5:15 pm #11509RonnyMacMember
I've run into a CSS issue with the .post-info and .post-meta selectors in the new Genesis 1.9 Child theme.
When information is removed from the Info and Post fields of Genesis Simple Edits, as expected, neither .post-info nor .post-meta information does not display on the page. However, the space where the information would display in .post-meta remains. It appears to be about 12 or 14 pixels or so.
I removed every instance of .post-meta in the Child's CSS file and the space remains. If I add .post-meta {margin:-12px;} the space collapses as expected.
On posts in that category I'm not using h2.entry-title, but instead a combo of dl, dt, dd to wrap the permalink (all with zero margins). The same problem does not exist on another category which does use h2.entry-title.
It's the oddest thing. The .post-info space disappears/collapses properly above the entry content, but not the .post-meta space below the entry content.
Any idea why the .post-meta would not collapse to zero when there's no data in the Simple Edits .post-meta field?
BTW - I'm using CSS Edit and MAMP for development, so there's no public facing option to view.
ronnymac
—
Ron McElfresh
Honolulu, HI
—
http://mac360.com/
http://mcelfresh.org/
http://mcsolo.com/
http://pixobebo.com/
http://noodlemac.com/January 12, 2013 at 5:30 pm #11512Bill MurrayMemberMy quick take is that the post-meta div is still output, and the padding-top of 1.5rem near line 547 in the stylesheet applies, whether Simple Edits outputs anything or not.
You can't use Simple Edits to remove the div. You need to do a remove_action in your child theme's functions.php.
Hope that helps.
Web: https://wpperform.com or Twitter: @wpperform
We do managed WordPress hosting.
January 12, 2013 at 6:01 pm #11515RonnyMacMemberYes, the div is still output both for .post-info and .post-meta, whether the field contains information or not. However, completely removing .post-info and .post-meta from the CSS (all instances) still leaves the space, so something else it at play.
I don't want to remove_action yet, but would prefer to find out what the CSS is doing to cause the space. Reducing margin to zero and height to zero for .post-info and .post-meta will collapse the .post-info space, though not all the way. A healthy gap still appears.
ronnymac
—
Ron McElfresh
Honolulu, HI
—
http://mac360.com/
http://mcelfresh.org/
http://mcsolo.com/
http://pixobebo.com/
http://noodlemac.com/January 12, 2013 at 6:03 pm #11517Jon BellahMemberYou can use
.post-meta { display:none; }
to "turn off" the div.
Follow me on the Twitters at @JonBellah. I blog about web design, development and a lot about Genesis at CSSForge.com
January 12, 2013 at 6:29 pm #11524Bill MurrayMember@RonnyMac - I hear you. It's hard to say what your CSS is doing until it's on a publicly available site. Is the space due to the bottom of the entry-content div?
Web: https://wpperform.com or Twitter: @wpperform
We do managed WordPress hosting.
January 12, 2013 at 6:49 pm #11525RonnyMacMemberYeah, this is a pain. I may park it somewhere for public view if my latest trial and error path doesn't pan out. A client wants the same dt, dl, dd linked list method in Daring Fireball.
The problem appears to be in dl, dt, and particularly dd. For a specific entry category the whole category's entry should be wrapped in a dl, then permalink and title are wrapped in dt, then the entry is wrapped in dd. That's not so easy to do in WordPress without major hackage. So, I wrapped the permalink and title and linked list link in a dl, with permalink and title link wrapped in a dt. The entry content was left alone. To validate the code there must be a dd, which would normally be the entry content itself. However, WP doesn't make it easy to drop in the dd CSS, so I simply added a blank dd -- <dd></dd>-- which validates. However, it seems that dd needs to be removed from the CSS to remove the dd space. Odd. But it works. I'm just not sure why.
😉
ronnymac
—
Ron McElfresh
Honolulu, HI
—
http://mac360.com/
http://mcelfresh.org/
http://mcsolo.com/
http://pixobebo.com/
http://noodlemac.com/January 12, 2013 at 7:43 pm #11526RonnyMacMemberGot it. Just don't know how to fix it.
The dl, dt, dd problem is solved for the .post-info space (as above).
However, the space following the entry is actually caused by a blank date tag. The first post uses code in functions.php to assign CSS to the first.post so the date can be hidden (which also hides the date on subsequent posts in the same category, and on the same date. That works well for the first post but not for subsequent posts in the same category on the same date. The date div is still displayed.
I don't see an easy way out of that. Unless there's a way to put a .first-post CSS or something similar on all posts in that category only on the most recent date.
Sigh.
In the words of Roseanne Roseannadanna, if it's not one thing, it's always something.
ronnymac
—
Ron McElfresh
Honolulu, HI
—
http://mac360.com/
http://mcelfresh.org/
http://mcsolo.com/
http://pixobebo.com/
http://noodlemac.com/January 12, 2013 at 10:37 pm #11532Bill MurrayMemberAnd why don't you want to remove post meta if you don't want to display it?
Web: https://wpperform.com or Twitter: @wpperform
We do managed WordPress hosting.
January 12, 2013 at 10:44 pm #11533RonnyMacMemberThe intent is not to display .post-info or .post-meta. The problem ended up being a dt div, and a my_date() problem with the first post (whereby the date, though hidden in the first post via CSS, could not be hidden in subsequent posts in the same category. No easy fix, either.
ronnymac
—
Ron McElfresh
Honolulu, HI
—
http://mac360.com/
http://mcelfresh.org/
http://mcsolo.com/
http://pixobebo.com/
http://noodlemac.com/January 12, 2013 at 11:17 pm #11537Bill MurrayMemberAnd what do you see as the difference between the intent of "not to display" and removing it - which thereby causes it not to display? Doesn't that match the intent?
Web: https://wpperform.com or Twitter: @wpperform
We do managed WordPress hosting.
January 13, 2013 at 12:42 am #11547RonnyMacMemberYes. But that wasn't the problem. Removing all instances of .post-info and .post-meta also causes them to not display. Removing .post-info and .post-meta seems to have multiple definitions. I can remove the information in Genesis Simple Edits-- a 'remove' which removes the information, but not the CSS, which is still formatted. Since I'm not using .post-info or .post-meta information, there's no need to have it in the CSS file, either, hence the removal. However, as is often the case before removing CSS, I chose to 'not display' what was visible. Either way, the end result is the same.
ronnymac
—
Ron McElfresh
Honolulu, HI
—
http://mac360.com/
http://mcelfresh.org/
http://mcsolo.com/
http://pixobebo.com/
http://noodlemac.com/ -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.