[Solved] First DIV a bit higher up

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
andershz
Forum Members
Forum Members
Posts: 49
Joined: Fri Nov 21, 2008 9:30 pm

[Solved] First DIV a bit higher up

Post by andershz »

The attached screen shot is from the summary view in Uploads 1.11.5 using the default summary template.
For some reason the first entry sits a little bit higher up than the rest.
Any idea why?
The HTML looks the same for all of them as far as I can see.

Code: Select all

            <div class="main-main util-clearfix">
              <h1 class="title">Files</h1>
              <!-- Start Upload Summary Template -->

<div>

</div>

      <div class="row" style="width: 100%; padding-bottom: 10px;">
   
  <div class="upload" style="float: left; width: 33%;">
    <a href="http://...>Dsc01628.jpg</a> (1290)<br/>
    <a href="http://.../uploads/12/Dsc01628-jpg.html" title="Dsc01628.jpg">
              <img src="http://.../uploads/images/Gallery/UserGallery/Medlem1/thumb_Dsc01628.jpg" alt="">
          </a>

    <br/>
    <a href="http://...>Send this file</a><br/>
    Författare: Medlem1<br/>
    Datum: 2010-12-02 21:17:03<br/>
    2 MC
  </div>

      </div>

       
  <div class="upload" style="float: left; width: 33%;">
    <a href="http://...>Dsc01626.jpg</a> (1206)<br/>
    <a href="http://.../uploads/13/Dsc01626-jpg.html" title="Dsc01626.jpg">
              <img src="http://.../uploads/images/Gallery/UserGallery/Medlem1/thumb_Dsc01626.jpg" alt="">
          </a>
    <br/>
    <a href="http://...>Send this file</a><br/>

    Författare: Medlem1<br/>
    Datum: 2010-12-02 22:00:40<br/>
    Sjö
  </div>

       
  <div class="upload" style="float: left; width: 33%;">
    <a href="http://...>Dsc01631.jpg</a> (1247)<br/>

    <a href="http://.../uploads/14/Dsc01631-jpg.html" title="Dsc01631.jpg">
              <img src="http://.../uploads/images/Gallery/UserGallery/Medlem1/thumb_Dsc01631.jpg" alt="">
          </a>
    <br/>
    <a href="http://...>Send this file</a><br/>
    Författare: Medlem1<br/>
    Datum: 2010-12-02 22:27:57<br/>

    Gubbe
  </div>

          <div class="row" style="width: 100%; padding-bottom: 10px;">
   
  <div class="upload" style="float: left; width: 33%;">
    <a href="http://...>Dsc01632.jpg</a> (1248)<br/>
    <a href="http://.../uploads/15/Dsc01632-jpg.html" title="Dsc01632.jpg">
              <img src="http://.../uploads/images/Gallery/UserGallery/Medlem1/thumb_Dsc01632.jpg" alt="">
          </a>

    <br/>
    <a href="http://...>Send this file</a><br/>
    Författare: Medlem1<br/>
    Datum: 2010-12-02 22:30:06<br/>
    Ännu en bild
  </div>

      </div>

       
  <div class="upload" style="float: left; width: 33%;">
    <a href="http://...>Dsc01634.jpg</a> (1052)<br/>
    <a href="http://.../uploads/16/Dsc01634-jpg.html" title="Dsc01634.jpg">
              <img src="http://.../uploads/images/Gallery/UserGallery/Medlem1/thumb_Dsc01634.jpg" alt="">
          </a>
    <br/>
    <a href="http://...>Send this file</a><br/>

    Författare: Medlem1<br/>
    Datum: 2010-12-02 22:30:52<br/>
    Ytterligare ännu en bild
  </div>

       
  <div class="upload" style="float: left; width: 33%;">
    <a href="http://...>DSC01843.JPG</a> (1248)<br/>

    <a href="http://.../uploads/17/DSC01843-JPG.html" title="DSC01843.JPG">
              <img src="http://.../uploads/images/Gallery/UserGallery/Medlem1/thumb_DSC01843.JPG" alt="">
          </a>
    <br/>
    <a href="http://...>Send this file</a><br/>
    Författare: Medlem1<br/>
    Datum: 2010-12-02 22:35:36<br/>

    Köp en hamn
  </div>

          <div class="row" style="width: 100%; padding-bottom: 10px;">
   
  <div class="upload" style="float: left; width: 33%;">
    <a href="http://...>DSC01849.JPG</a> (1248)<br/>
    <a href="http://.../uploads/18/DSC01849-JPG.html" title="DSC01849.JPG">
              <img src="http://.../uploads/images/Gallery/UserGallery/Medlem1/thumb_DSC01849.JPG" alt="">
          </a>

    <br/>
    <a href="http://...>Send this file</a><br/>
    Författare: Medlem1<br/>
    Datum: 2010-12-02 22:36:11<br/>
    Paraflax
  </div>

      </div>

    <!-- End Upload Summary Template -->

Attachments
Capture.JPG
Last edited by andershz on Fri Dec 03, 2010 9:02 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: First DIV a bit higher up

Post by Dr.CSS »

A link would really help but maybe this empty div...



ajprogramming
Forum Members
Forum Members
Posts: 24
Joined: Sat Jan 09, 2010 4:38 pm

Re: First DIV a bit higher up

Post by ajprogramming »

     

Why is this only around the first item in the row?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: First DIV a bit higher up

Post by Dr.CSS »

I put it in PSPad editor to see if you were missing any closed divs etc., turns out you are missing " in your links...

Error: missing quote mark for attribute value
Send this file

Should be...
Send this file
andershz
Forum Members
Forum Members
Posts: 49
Joined: Fri Nov 21, 2008 9:30 pm

[Solved] First DIV a bit higher up

Post by andershz »

ajprogramming wrote:      

Why is this only around the first item in the row?
Because there was an error in the uploads summary template...
Calguy's of course, not mine  ;)

Thanks for spotting this.

I have modified the template a bit, now the whole row is at the same level.
The missing quote was just a copy-paste error when I copied the page source into the forum.

New code:

Code: Select all

{foreach from=$items item='entry' name='uploads'}
  {if $smarty.foreach.uploads.first}
    <div class="row" style="width: 100%; padding-bottom: 10px;">
  {elseif $smarty.foreach.uploads.index % 3 == 0}
    </div><div class="row" style="width: 100%; padding-bottom: 10px;">
  {/if}
 
  <div class="upload" style="float: left; width: 33%;">
    <a href="{$entry->detailurl}">{$entry->upload_name}</a> ({$entry->size})<br/>
    <a href="{$entry->download_url}" title="{$entry->upload_name}">
      {if isset($entry->thumbnail_url)}
        <img src="{$entry->thumbnail_url}" alt="">
      {else}
        <img src="{$entry->iconurl}" alt="">
      {/if}
    </a>
    <br/>
    <a href="{$entry->sendfile_url}" title="">Send this file</a><br/>
    {$author}: {$entry->author}<br/>
    {$date}: {$entry->date}<br/>
    {$entry->summary}
  </div>

  {if $smarty.foreach.uploads.last}
    </div>
  {/if}
Old code:

Code: Select all

{foreach from=$items item='entry' name='uploads'}
  {if ($smarty.foreach.uploads.index == 0) or ($smarty.foreach.uploads.index % 3 == 0)}
    <div class="row" style="width: 100%; padding-bottom: 10px;">
  {/if}
 
  <div class="upload" style="float: left; width: 33%;">
    <a href="{$entry->detailurl}">{$entry->upload_name}</a> ({$entry->size})<br/>
    <a href="{$entry->download_url}" title="{$entry->upload_name}">
      {if isset($entry->thumbnail_url)}
        <img src="{$entry->thumbnail_url}" alt="">
      {else}
        <img src="{$entry->iconurl}" alt="">
      {/if}
    </a>
    <br/>
    <a href="{$entry->sendfile_url}" title="">Send this file</a><br/>
    {$author}: {$entry->author}<br/>
    {$date}: {$entry->date}<br/>
    {$entry->summary}
  </div>

  {if ($smarty.foreach.uploads.index == 0) or ($smarty.foreach.uploads.index % 3 == 0)}
    </div>
  {/if}
Last edited by andershz on Fri Dec 03, 2010 9:04 am, edited 1 time in total.
andershz
Forum Members
Forum Members
Posts: 49
Joined: Fri Nov 21, 2008 9:30 pm

Re: First DIV a bit higher up

Post by andershz »

Dr.CSS wrote: I put it in PSPad editor to see if you were missing any closed divs etc., turns out you are missing " in your links...

Error: missing quote mark for attribute value
Send this file

Should be...
Send this file
Sorry, the missing quote was just a copy-paste error when I copied the page source into the forum. Thanks for your help anyway.
Post Reply

Return to “Layout and Design (CSS & HTML)”