TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,910
  • Total Topics: 21,307
  • Online today: 872
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 566
  • Total: 566

Custom Stylesheets for blocks?

Started by Bloodlvst, October 29, 2010, 04:40:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bloodlvst

I've made a ventrilo block, which I will post here once it's finalized.

The problem is that I want to avoid using an iframe. The php script works great, and I have a css file linked to it, in the same directory. When I use an iframe, the script's CSS styling is like as if I ran the script alone. If I use a php block with the following code, it's formatted only according to SMF/TP's CSS.
include('ventrilo/vent.php);

IchBin

Use the full path instead of the relative path when calling your file from inside a block.

Bloodlvst

Quote from: IchBin on October 29, 2010, 05:18:19 PM
Use the full path instead of the relative path when calling your file from inside a block.

Would it be possible to just use the pure code as well?

EDIT: Using the full path did not change anything. :(

EDIT2: Pure code also uses default TP CSS

WillyP

Take a look with Firebug and see if it's finding the css file at all.

hidden69

code example:


<style type="text/css">
.ventrilo {
    color: #FF0000;
}
.ventrilo p {
      color: #0000FF;
}
</style>

<span class="ventrilo">

MY TEST

<p> even that works for cut&paste freaks</p>

</span>

IchBin

Although that is not valid when you stick a <style> tag outside of the body of the theme, it should still work.

hidden69

you are right, its not valid, but it is shown.

a valid solution would be

<p style="color:#FF0000">Test 1</p>

<p style="color:#00FF00">Test 2</p>

Bloodlvst

It was actually me misinterpreting IchBin's answer.

I have it working now, will post it once I tweak the looks.

hidden69

Quote from: Bloodlvst on November 03, 2010, 02:59:48 AM
It was actually me misinterpreting IchBin's answer.

I have it working now, will post it once I tweak the looks.

well <link .. > is only allowed in the head section of a html-document and not in the body section to be valid, the same as the first example.

This website is proudly hosted on Crocweb Cloud Website Hosting.