1
council
Adding CSS to XHLDO
  • 2005/2/8 15:27

  • council

  • Not too shy to talk

  • Posts: 184

  • Since: 2004/12/18


First, congradulations to all you XOOPS award winners. May the force be with you.

Question: How do I add css to my xhld0 display? I looked in the xhld0 folder. No css. Also, it doesn't appear to be inheriting the css from the page it's on.

Thanks,

Richttp://blacklogs.com

2
tripmon
Re: Adding CSS to XHLDO
  • 2005/2/8 16:18

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


You can:

1) embed the style definitions as well as the id/style tags in the block html (block info below).

2) use existing, or create new styles in the *style sheet for your theme*, link to it, and code the tags in the block html.

3) create a new style sheet and link it to and code the tags in the block html.

-------------
these are the 2 files that control the html output.
xhld0_block_rss.html - xhld/templates
xhld0_block.html - xhld/templates
-------------
this file controls the output from the 2 files above
xhld0_block_mixed.html - xhld/templates/blocks

GL

3
council
Re: Adding CSS to XHLDO
  • 2005/2/8 19:18

  • council

  • Not too shy to talk

  • Posts: 184

  • Since: 2004/12/18


Quote:

tripmon wrote:
You can:

1) embed the style definitions as well as the id/style tags in the block html (block info below).

2) use existing, or create new styles in the *style sheet for your theme*, link to it, and code the tags in the block html.

3) create a new style sheet and link it to and code the tags in the block html.

-------------
these are the 2 files that control the html output.
xhld0_block_rss.html - xhld/templates
xhld0_block.html - xhld/templates
-------------
this file controls the output from the 2 files above
xhld0_block_mixed.html - xhld/templates/blocks

GL


Thanks, a couple of questions though.

Are you saying I place the link in xhldo_block_mixed.html?

And if so, where? There's no "head" in this file.

Ric

4
tripmon
Re: Adding CSS to XHLDO
  • 2005/2/10 19:33

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


Compare code this to your:
/modules/xhld0/templates/xhld0_block.html file.

Quote:

<style type="text/css">
<!--
.thislink {
font-size: xx-small;
background-color: #eff4f8;
display: list-item;
}
.thistitle {
font-weight: bold;
font-variant: small-caps;
}
-->
</style>
<a href="<{$site_url}>" target="_blank" class="thistitle"><{$site_name}></a><br />
<{if $image.url != ""}>
<img src="<{$image.url}>" width="<{$image.width|default:88}>" height="<{$image.height|default:31}>" alt="<{$image.title}>" /><br />
<{/if}>

<ul>
<{section name=i loop=$items}>
<!-- <{if $items[i].title != ""}>
<{* <li><a href="<{$mod_url}>/index.php?id=<{$site_id}>#<{$items[i].link}>"><{$items[i].title}></a></li> *}>
<li>
<{if $items[i].pubdate != "" }>
<script type="text/javascript">document.write(phpDate('<{$dtfmt_short}>', <{$items[i].pubdate}>));</script>
<noscript><{$items[i].date_short}></noscript>
&nbsp;
<{/if}> -->

<li class="thislink"><a href="<{$items[i].link}>" target="_blank"><{$items[i].title}></a>
</li>
<{/if}>
<{/section}>
</ul>




Upload this in place of your current file (and update the xhld0 module) and you will see the CSS changes (.thislink and .thistitle) are causing.... blue background w/ xx-small text links and bold all-caps title text.

If you don't want to include the style in the block file as I have done, you can create a style in any other style sheet and link to it.

That's as plain as I can tell it.

GL!

Login

Who's Online

114 user(s) are online (85 user(s) are browsing Support Forums)


Members: 0


Guests: 114


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits