Jump to content

[SOLVED] CSS question how to use "display:line"


PovkaREAL

Recommended Posts

Hello,

how to use here "display:inline"

<h1>
	{strip}
	{$category->name|escape:'htmlall':'UTF-8'}
	{if isset($categoryNameComplement)}
	{$categoryNameComplement|escape:'htmlall':'UTF-8'}
	{/if}
</h1>
	<span class="category-product-count">
	{include file="$tpl_dir./category-count.tpl"}
	</span>
	{/strip}

Thanks,

Belts.lt

Link to comment
Share on other sites

Hello Vekia,

 

thanks for answer, but it is to difficult for me :) It is my category.tpl. Can you help me to apply your code here. I want category name (H1) and items quantity in one line.

{include file="$tpl_dir./breadcrumb.tpl"}
{include file="$tpl_dir./errors.tpl"}
{if isset($category)}
	{if $category->id AND $category->active}
		
               <h1>
	{strip}
	{$category->name|escape:'htmlall':'UTF-8'}
	{if isset($categoryNameComplement)}
	{$categoryNameComplement|escape:'htmlall':'UTF-8'}
	{/if}
</h1>
	<span class="category-product-count">
	{include file="$tpl_dir./category-count.tpl"}
	</span>
	{/strip}
		
		{if $scenes}
			<!-- Scenes -->
			{include file="$tpl_dir./scenes.tpl" scenes=$scenes}
{*
		{else}
			<!-- Category image -->
			{if $category->id_image}
			<div class="align_center">
				<img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" />
			</div>
			{/if}
*}
		{/if}
		{if $category->description}
			{if strlen($category->description) > 350}
			<p class="cat_desc bordercolor bgcolor" id="category_description_short">{$category->description|truncate:350} <a href="#" onclick="$('#category_description_short').hide(); $('#category_description_full').show(); $(this).hide(); return false;" class="lnk_more">{l s='More'}</a></p>
			<p class="cat_desc bordercolor bgcolor" id="category_description_full" style="display:none">{$category->description}</p>
			{else}
			<p class="cat_desc bordercolor bgcolor">{$category->description}</p>
			{/if}
		{/if}
		{if isset($subcategories)}
		<!-- Subcategories -->
		<div id="subcategories" class="clearfix">
			<h2>{l s='Subcategories'}</h2>
			<ul>
			{foreach from=$subcategories item=subcategory}
				<li>
					<a class="bgcolor bordercolor" href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}">
						{if $subcategory.id_image}
							<img class="bordercolor" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')}" alt="" />
						{else}
							<img src="{$img_cat_dir}default-medium_default.jpg" alt="" />
						{/if}
					<span>{$subcategory.name|escape:'htmlall':'UTF-8'|truncate:20:'...'}</span>
					<strong></strong>
					</a>
				</li>
			{/foreach}
			</ul>
		</div>
		{/if}
		{if $products}
			{include file="$tpl_dir./product-sort.tpl"}
			{include file="$tpl_dir./product-list.tpl" products=$products}
			{include file="$tpl_dir./product-compare.tpl"}
			{include file="$tpl_dir./pagination.tpl"}
		{elseif !isset($subcategories)}
		<p class="warning">{l s='There are no products in this category.'}</p>
		{/if}
	{elseif $category->id}
		<p class="warning">{l s='This category is currently unavailable.'}</p>
	{/if}
{/if}

Thank you!

 

 

Best regards,

Povilas

Belts.lt

Link to comment
Share on other sites

 use this code:


<div style="display:block; clear:both; overflow:hidden"> 
<h1 style="display:inline-block; float:left;">
{strip}
{$category->name|escape:'htmlall':'UTF-8'}
{if isset($categoryNameComplement)}
{$categoryNameComplement|escape:'htmlall':'UTF-8'}
{/if}
</h1>
<span class="category-product-count" style="display:inline-block; float:left;">
{include file="$tpl_dir./category-count.tpl"}
</span>
{/strip}
</div>

  • Like 1
Link to comment
Share on other sites


<div style="display:block; clear:both; overflow:hidden">

<h1 style="display:inline-block; float:left;">

{strip}

{$category->name|escape:'htmlall':'UTF-8'}

{if isset($categoryNameComplement)}

{$categoryNameComplement|escape:'htmlall':'UTF-8'}

{/if}

</h1>

<span class="category-product-count" style="display:inline-block; float:right; margin-top:30px;">

{include file="$tpl_dir./category-count.tpl"}

</span>

{/strip}

</div>

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...