Changing style for bbcode

All style (template, theme and imageset) related questions for the new release; advice, feedback here please.
Post Reply
rashid
Registered User
Posts: 8
Joined: Wed Jan 10, 2007 6:35 pm

Changing style for bbcode

Post by rashid »

This is my style:

Code: Select all

a.i {position: relative;}

a.i span {display: none;}
a.i:hover span {

  position: absolute;
  top: 5px;
  left: 30px;
  display: block;
  background: transparent;
}


For this bbcode:

Code: Select all

[item]{TEXT}[/item]

Will be replaced with:

<body>
<p>
<a class="i" href="#">{TEXT}
<span>
<iframe 
id="wowitem{TEXT}" 
src="http://www.kotaguild.net/rashid/forum/neo_wowitems/showitem.php?id={TEXT}" 
name="wowitem{TEXT}" 
height="600"
frameborder="0" 
vspace="0" 
hspace="0"
marginwidth="0" 
marginheight="0"  onLoad="if(this.contentDocument) this.height=this.contentDocument.documentElement.scrollHeight; else this.height=window.frames[this.name].document.body.scrollHeight;">
</iframe>
</span>
</a>
 </p>
</body>
But it doesn't work... if I put them on the same html, it's all working how I want it to work.
But I placed the style in the stylesheet.css and it doesn't help...

Do I have to put it in another file or what?

Can I get some help here please? :(

rashid
Registered User
Posts: 8
Joined: Wed Jan 10, 2007 6:35 pm

Re: Changing style for bbcode

Post by rashid »

*bump*

Dokster
Registered User
Posts: 4
Joined: Sat Jan 27, 2007 11:50 am

Re: Changing style for bbcode

Post by Dokster »

use inline css ! that way you dont need to change a file.

rashid
Registered User
Posts: 8
Joined: Wed Jan 10, 2007 6:35 pm

Re: Changing style for bbcode

Post by rashid »

Dokster wrote: use inline css ! that way you dont need to change a file.

Yeah, the problem is that can't be done via inline CSS :(
Anyway, I found the problem, I did well, edited the right CSS file, but there was a problem in my code...


Delete this thread.

Klors
Registered User
Posts: 95
Joined: Fri Sep 19, 2003 2:08 pm

Re: Changing style for bbcode

Post by Klors »

Firstly, I can't see anything there that couldn't be done using the style="" property or inline css in a <style> tag, though obviously the stylesheet is the best place for it. Maybe I'm missing something.

Second, why are you defining a span as a block level element? Surely a div would be better suited to this?

Third, are you really putting the <body> tag in a bbcode replacement? If so, don't, encapsulate it in a <div> rather than <body>.

rashid
Registered User
Posts: 8
Joined: Wed Jan 10, 2007 6:35 pm

Re: Changing style for bbcode

Post by rashid »

Klors wrote: Firstly, I can't see anything there that couldn't be done using the style="" property or inline css in a <style> tag, though obviously the stylesheet is the best place for it. Maybe I'm missing something.

Second, why are you defining a span as a block level element? Surely a div would be better suited to this?

Third, are you really putting the <body> tag in a bbcode replacement? If so, don't, encapsulate it in a <div> rather than <body>.

1: Impossible to set inline:

Code: Select all

a.i:hover span {

  position: absolute;
  top: 5px;
  left: 30px;
  display: block;
  background: transparent;
}
2: The block is how I like it :P
3: No I'm not putting the body there, I had it in a local html file for testing and when I copied I forgot to delete the <body> tags...

User avatar
SHS`
Registered User
Posts: 1628
Joined: Wed Jul 04, 2001 9:13 am
Location: The Boonies, Hong Kong
Contact:

Re: Changing style for bbcode

Post by SHS` »

Specificity.
Jonathan “SHS`” Stanley • 史德信
phpBB™ 3.1.x, Bug/Security trackers
phpBB™ Bertie Bear 3.0 — prosilver Edition!Asking Questions The Smart Way

Post Reply