Jump to content

Archived

This topic is now archived and is closed to further replies.

rekent

Padding relative to edge rather than previous element?

Recommended Posts

rekent

I have a line of text with 4 elements, each with their own CSS class. (visible on the accordions here: http://www.hjil.org/journal-archive/)

 

They are positioned using left padding, but that makes them relative to the previous element and no an absolute position like the left edge, resulting in my page numbers being out of alignment.  Surely there is an alternative means for positioning these elements so they are aligned all the way down the page regardless of the width of the preceding element.  

 

Can anyone point me in the right direction?

Share this post


Link to post
Share on other sites
Danny

Hi,

 

I am not quite sure what you're referring to and the link you provided gives a 404. Can you provide the correct link to the page in question please, so we can take a closer look.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
rekent

Oops, sorry. I apparently mis-clicked and included the closing parenthesis in the hyperlink.  Here is the correct one: http://www.hjil.org/journal-archive

 

The text items on the accordions are positioned using left padding, until I realized this was going to result in them being out of alignment.  For example, see how the left edge of the page numbers are not aligned since the season and date that precede them have varying widths.  I also tried using absolute positioning, but that resulted in the same alignment issues and made the pages numbers stack on top of each other.

Share this post


Link to post
Share on other sites
rekent

I have an additional problem on that same page, but it is a recurring problem I have had on several others.  On the page linked above I have the following code in the DMS custom code box and it functions correctly.  However, when I try to move the code out to my child theme style.css or style.less sheet, it no longer works.  It will only work in the DMS custom code box.  The same issue occurs with custom LESS buttons, and other custom stylings that will work in the DMS custom code box, but not in my style sheets.  Has anyone else experienced this and found a cause/solution?

.masthead-format {
    div.textwidget {
        line-height: 38px;
        font-size: 12px;
        font-variant: small-caps;
    }
    h2.widgettitle {
        font-size: 12px;
    }
}

Share this post


Link to post
Share on other sites
Danny

OK, regarding your issue with your accordions, I assumed you were using the accordion shortcode. However, you're actually using a third party extension, which PageLines staff do not provide support for. Therefore, I have moved your topic to the correct forum and ellenmva mentioned the developer who can provide assistance.

 

In regards to your custom CSS/LESS not working when adding to a style sheet this is due to you not prefixing your code with a override class. See here for more information.

 

http://docs.pagelines.com/customize/overriding-default-css


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
rekent

I have tried both the #site and #page prefixes, but they have no impact.  For example, a custom button in the LESS sheet will not work with or without the prefixes, but in teh custom code box it will, same with the code above. Regardless of prefix or style sheet, it will not work until it is placed in the custom code box.

 

Additionally, the accordion title question was a general CSS question, not something related to accordions, but I believe I have solved that one so the only outstanding issue is CSS not working unless it is placed in the custom code box.

Share this post


Link to post
Share on other sites
ellenmva

rekent Are you all set with Accordions styling?

 

I'm not sure of the issue you are having with the child theme. Do you have the DMS Developer Tools installed? If not, you can find it in your account on pagelines.com. When installed go to the tab with the wrench and enable no LESS and cache modes.

 

DMS_Plugins___Just_another_WordPress_sit

 

Now try putting in something like this code in the style.less file.

body {
background: red !important;
}

Does it work?

 

Ellen


Ellen Moore

Pagelines Developer

www.elsue.com www.betterdms.com

Share this post


Link to post
Share on other sites

  • Similar Content

    • petere21
      By petere21
      As I understand El Sues Accordions section is broken. Simon solved this problem by fixing section and we need to download it again.
      But in my account in download area there is no accordions section to download. Where can I download it? !!! Asap please my web is broken.
      Peter
       
    • chamois_blanc
      By chamois_blanc+
      Hello,
      All accordion entries are shown every time, independently of the set selected. See example here:
               http://swinginatthesavoy.com/register/
      The first accordion should only show the 2nd and 3rd entries, instead of all of them. The second accordion should only show the 1st entry.
      Please fix asap! I haven't changed anything to my content in a few weeks and it was working fine before. I am guessing this appeared in one of the latest DMS updates. I am going to use some CSS to try to hide the undesirable entries.
      Gilles
    • balfred1345
      By balfred1345
      Hi Ellen,
      I've tried every way I could think of to use CSS to get rid of what I assume is padding or margin from the top of the accordion section so that it can be closer to the <p> above it. 
      Here's a screenshot of the way it looks now:  http://screencast.com/t/2c66f6y0dex
      If you'd like to look at the page please see: http://whub34.webhostinghub.com/~videoh6/cidev2.com/moving-services/mankato-mn-movers/
      I'd like to have the accordion section with the word "More" much closer to the paragraph line above it. If you look at the CSS you'll see several instances where I put in margin: 0 !important; and padding: 0 !important.
      Can you please tell me how I can adjust the section so it is closer to the paragraph above it?
      This site is on latest versions of DMS 2 and WP. 
      Many thanks,
      Bruce
    • flourishdesignstudio
      By flourishdesignstudio+
      Hello,
      I wanted to let the community know that there is a problem that has happened on a couple of DMS sites that we manage. The problem is that there are certain plugins/sections that DMS uses (such as 'Accordions' and 'Sidekick') that will appear to have an update. However, when you actually update the plugin it is replaced but a similarly named plugin. Here are the original plugins:
       
      Original: http://dms.elsue.com/accordions/ (authored by @ellenmva)
      Replaced with: https://wordpress.org/plugins/accordions/
       
      Original: http://www.pagelines.com/shop/third-party-extensions/sidekick/ (authored by Evan Mattson)
      Replaced with: https://wordpress.org/plugins/sidekick/
       
      I just wanted to know if there is anything I can do to make sure that other plugins/sections do not get replaced when I update them in the future as well as bring it to the DMS community's attention so that others do not experience the same confusion and frustration. Any thoughts would be very welcome in order to avoid this in the future.
      Thanks!
    • alisamski
      By alisamski+
      Using the accordion section... and I am trying to link a menu item to the accordion title.. not individual areas...
      My links work in the main menu, linking to an accordion title... however, they seem to have issues... I have two accordions on this page...
      When I use the menu link (below).. it breaks the accordion action... it will not open the accordion to show all the content.
      http://bit.ly/1TepJ3s
      http://bit.ly/1Hwqf84
      however when I go to the actual page.. there is no issue.
      http://bit.ly/1QPBt8r
      Please if you can take a look, I'd appreciate it.. not sure if I have the link correct.
×