Support » Themes and Templates » Negative Margin Layouts Bork in WP 2.0.X

  • This is twice now, with two different very well designed and validating layouts, with the only thing they have in common being the use of Negative Margins to achieve source ordering of content. These two layouts work in static html sites very well, they work in ModX templating very well, they work in CubeCart templating very well, they work in WP 1.5.X templating very well, and code validates in all cases. But in WP 2.0 if you put stuff in the sidebar besides sidebar code it’s very possible the sidebar stuff will start flying all over the place- and it sometimes flies with ONLY sidebar code. And nothing will fix it.

    The two layouts? Ryan Brill’s Neg Margin Layout from A List Apart:
    http://www.alistapart.com/articles/negativemargins/
    The Jello Piefecta from Position is Everything:
    http://positioniseverything.net/articles/sidepages/jello-piefecta-clean.html

    Anyone who wishes to contact me to let me know another good layout that isn’t working with 2.0 can do so here:
    http://kickasswebdesign.com/wordpress/contact-kickass-web-design/

    I’m posting this as a plea for this issue to be looked at. Used to be that we could use ANY good frontend code to create a WP template, which put WP heads above other programs. Now that’s not the case, we have to pick and choose our layouts, often substandard ones, just to get the dang code to work. I’ve complained in the past about Joomla and Mambo and ZenCart and OSCommerce dictating to me that table code will be in my front end source whether I want it or not. Though this is different it’s no less problematical in its result.

    I would also love to hear from others who have experienced problems with themes that work in WP 1.5.x and not in 2.0.x, so maybe we can figure out more similarities to point devs toward.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The only thing that really makes sense is that it is either a browser problem (IE especially seems to have issues with positioning and margin) or something in the CSS. I’ve used negative margins before, in both 2.0 and 2.0.1 without issue. I use a negative percentage margin now and everything is fine.

    As far as I can tell, WordPress doesn’t really generate any CSS on its own, so reason would say that it has to be a plug-in or something wonky in a style sheet somewhere.

    WordPress seems to be inherently “layout-friendly”, almost any of the convenience features that it does generate class elements for can be accessed with an alternate command so as to be style free.

    The links you’ve posted for the layouts are rather old, the position everything link is from July of 2005 and the Neg Margins link is from June 2004 – I’m guessing things have changed in WordPress since then, so it goes to reason that prescribed methods for long outdated versions of WP would not function well, if at all.

    I’m certainly not saying that it can’t be causing the issues you are having, so maybe you could post a list of the plug-ins you are using, what kind of modifications you’ve made and all that and then all of those can be eliminated from the equation.

    Cheers,
    Michael.

    Sidebar issue from yesterday. Could be unrelated.
    http://wordpress.org/support/topic/62633?replies=12

    Thread Starter kickass

    (@kickass)

    Podz, thanks, I’ll play with clearing that cache out and see if that makes a difference on either of these two borked themes. The database on my test install is fine. Oh, for the record, vkaryl downloaded and verified the Brill layout theme bork. I think she ran it on her local install. There was no javascript of any kind in that theme, nor in the one on the PIE layout. But I have had some issues with jscript and the sidebar on another theme using the PIE layout.

    Michael,

    First of all, the links I posted are for CSS LAYOUTS that were created by some of the top xhtml/css coders on the planet (you didn’t recognize those names?)

    Secondly, if the layout works on a static html page in every browser, even IEMac, and the layout works on WP 1.5.x in every browser, even IEMac, and it works when templated to a different program in every browser, even IEMac, then it’s not a browser issue, especially when the layout borks exactly the same way in EVERY browser, including IEMac, but only in WP 2.0. Follow MY logic?

    Thirdly, I have created probably in the neighborhood of 50 or more themes. I think I know how by now. I’m not a beginner, as most of the regular people here know.

    This is the list of plugins I have active on my test blog:

    Well, actually, I ran it not only locally but on in-place server-hosted testbeds (one, 1.5.2 – worked perfectly; one 2.0 – totally borked; neither had any js or plugins activated).

    Thread Starter kickass

    (@kickass)

    Oh, so you did give it a good workout. A couple other people who snagged it off my blog also did, and couldn’t see a damn thing wrong with it.

    ooh, I just had a thought. There is a bit of a sort of a kind of a jscript in there . . . the conditional comment for lte IE 6 browsers to call the iestyle.css that hides stuff from IE7 . . . podz, could that have ANYTHING to do with this? We have to use that now to futureproof our sites against the advent of IE7 . . . oh PLEASE tell me that has nothing to do with it!


    <!--[if lte IE 6]>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/iestyle.css" type="text/css" media="screen" />
    <![endif]-->

    Oh gosh. I never even thought about that being js – but quite obviously it is. That could get UGLY….

    kickass,

    there is no need to snippy or pompous. I don’t know who those people are and I don’t know who you are, so it makes no difference to me if you are the best designer or the worst, I was simply offering you suggestions to assist in tracking the down the problem.

    Whether you’ve designed 1 theme or 1000 themes, you will make mistakes, even going over and over the code, it is the completely human thing to do to miss one little thing, because neither you nor I nor anyone else is perfect.

    Good luck,
    Michael.

    EDIT: Regarding the above with the IE only style sheet, though I use a negative margin for all decent browsers, I have an IE only style sheet which does not use it. That shouldn’t cause errors in other browsers, but just my contribution nonetheless.

    Thread Starter kickass

    (@kickass)

    Vicki, the only thing that makes me hold out hope that the conditional comment isn’t the problem is that I also have it on the “simple crappy” layouts that work in 2.0 with no sidebar problems. But then again, these themes that cough a hairball with 2.0 are very complex layouts and we all know that 2.0 does seem to have a bit of an issue with jscript. Even good well-written jscript.

    And yes, you’re very right. If it is the conditional comment this could get ugly.

    Michael, you’re right, people do make mistakes, that is what the validator is for. 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Negative Margin Layouts Bork in WP 2.0.X’ is closed to new replies.