Jump to content

Archived

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

MrFent

Using the PageLines Grid inside an ordered list

Recommended Posts

MrFent

I have a need to use the grid on individual line items inside an ordered list (I'm editing a recipe plugin template, so the grid has to be inside the <ol> because that's how the recipe plugin works. Here's my code:

 

<ol>
<li><div class="row"><div class="span8">This is span8</div><div class="span4">This is span4</div></div></li>
<li><div class="row"><div class="span8">This is span8</div><div class="span4">This is span4</div></div></li>
<li><div class="row"><div class="span8">This is span8</div><div class="span4">This is span4</div></div></li>
</ol>
 
I simplified this code by adding the row class to the <li> tag:
 
<ol>
<li class="row"><div class="span8">This is span8</div><div class="span4">This is span4</div></li>
<li class="row"><div class="span8">This is span8</div><div class="span4">This is span4</div></li>
<li class="row"><div class="span8">This is span8</div><div class="span4">This is span4</div></li>
</ol>
 
Both versions produce the same result. The issue I'm having is that my content does not line up with the number in the list. It starts on the next line underneath the list number. I need it to be on the same line.
 
Any ideas?
 
 

 

Share this post


Link to post
Share on other sites
Danny

Hi Chris,

 

As far as I am aware it can't be done, not in the way you want it aligned anyway. I even went as far as adding the HTML like this:

 

<ol>
    <li>
      <div class="row">
        <div class="span8">This is span8</div>
        <div class="span4">This is span4</div>
      </div>
    </li>
    <li>
      <div class="row">
        <div class="span8">This is span8</div>
        <div class="span4">This is span4</div>
      </div>
    </li>
  </ol>
 
to Bootstraps 2.x docs and this is the result - https://cloudup.com/c9Sdk_l_4kX
 
This is your code on Bootstrap - https://cloudup.com/c2vIv86ZSyT
 
The only other alternative would be (as far as I can tell) would be to add your numeric value in a span too, such as this:
 
<div class="row">
  <div class="span1">1.</div>
  <div class="span8">This is span8</div>
  <div class="span3">This is span3</div>
<div>
<div class="row">
  <div class="span1">2.</div>
  <div class="span8">This is span8</div>
  <div class="span3">This is span3</div>
<div>

 


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
MrFent

I tried some simple CSS to achieve what I needed:

 

ol .row:last-child > [class*="span"] {position:relative;top:-19px;}

Share this post


Link to post
Share on other sites
Danny

Cool.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • Lisa Haran
      By Lisa Haran+
      Hi 
      I have a map here http://www.iloveoffset.com/maps/
      I want to add several pointer locations to the map, but when I do they do not appear.
      On this map there are 2 pointer locations and as you can there is only one visible.
      Earlier today I added 7 and could only see 4 so there is something odd going on.
      My theme is up to date
    • clj182
      By clj182+
      Hello,
      I've been having trouble unlocking the template section for past couple of weeks. When I try clicking nothing happens. 
      I've deleted my custom css and removed plugins. Im down to having only the following plugins:
      Akismet
      Contact Form 7
      DMS Professional Tools
      Pagelines Updater
      WooCommerce
      It was working fine before i have no idea what's going on with it.
    • flourishdesignstudio
      By flourishdesignstudio+
      My DMS 2 site http://www.heart-stone.com/ will not save any new custom css... I can still edit templates and publish those but any custom css that I enter never saves.
      All WP files, themes, and plugins are up to date. 
      Any thought about what might be causing this?
    • flourishdesignstudio
      By flourishdesignstudio+
      Is there a way to edit the custom CSS via FTP? I know I can edit the custom code in the Chrome editor but is there a file path I can use to find and edit the CSS directly from our FTP?
      Thanks in advance for the help!
    • nizami
      By nizami+
      Using navbar section with correctly configured WP menu to display main navigation at https://elenaangel.com. 
      All fine in desktop viewport. Menu displays twice in hamburger mode. How to fix this please? 

×