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,972
  • Latest: Lineo
Stats
  • Total Posts: 196,165
  • Total Topics: 21,346
  • Online today: 678
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 496
  • Total: 496

Issues with a css inside a block ...

Started by mrbean17, March 27, 2007, 11:11:33 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Dazed

Out of curiosity could the list tags be messing it up?

mrbean17

The <li> tag?

I don't know ... but the fact is it works fine in straight html (http://importantworkstuff.com/HTML/Includes/Menu2.html) ... so I'm just puzzled to as why it wouldn't be working inside a html block. If I were to remove those tags, then I'd loose my css formatting.

mrbean17

Blah, I give up ... going back to my old menu.

Thanks for the help Grumpy.

Resident Geek

#13
LOL, You've got the exact opposite problem that I had when I put an HTML nav-bar in. I couldn't get it too add
I suspect that the block you put the code into killed some of the code for some reason. But then why would it show up fine in the preview? A bug possibly? The code looks fine to me man.
I'm using the following code on my site:
global  $scripturl,$settings,$boardurl,$context;
echo'
<div class="smalltext">
<font  size="1"><b>Navigation</b></font><br><hr>
<img src="',$settings['images_url'],'/menu/links.gif"/><font size="2"><a href="',$scripturl,'"> Development Portal</a></font><br>
<img src="',$settings['images_url'],'/menu/forum.gif" /><font size="2"><a href="',$scripturl,'?action=forum"> Development Forum</a></font></b><br>
<img src="',$settings['images_url'],'/menu/archive.gif" height="16" width="16"/><font size="2"><a href="',$scripturl,'?action=tpmod;dl=0"> Downloads</a></font><br>
<img src="',$settings['images_url'],'/menu/rss.gif" height="16" width="16"/><font size="2"><a href="http://www.yoursite.com/wiki/index.php?title=Main_Page"> Yoursite's Wiki</a></font><br>
<size="1"><b>Services</b></font><br><hr>';
if ($context['allow_calendar'])
{
echo'<img src="',$settings['images_url'],'/menu/calendar.gif"/><font size="2"><a href="',$scripturl,'?action=calendar"> Calendar</a></font><br>';
}
echo'<img
src="',$settings['images_url'],'/menu/cp.gif"/><font size="2"><a href="',$scripturl,'?action=profile"> Profile Settings</a></font><br>
<img
src="',$settings['images_url'],'/menu/members.gif"/><font size="2"><a href="',$scripturl,'?action=mlist"> Member List</a></font><br>
<img src="',$settings['images_url'],'/menu/online.gif"/><font size="2"><a href="',$scripturl,'?action=who"> Who\'s Online?</a></font><br>
<img src="',$settings['images_url'],'/menu/stats.gif"/><font size="2"><a href="',$scripturl,'?action=stats"> Statistics</a></font><br><br>
<font size="1"><b>Help & Support</b></font><br><hr>
<img src="',$settings['images_url'],'/menu/search.gif"/><font size="2"><a href="',$scripturl,'?action=search"> Search</a></font><br>
<img src="',$settings['images_url'],'/menu/faq.gif"/><font size="2"><a href="http://www.yoursite.com/wiki/index.php?title=Knowledge_Base"> Knowledge Base</a></font><br>
</div>';


It looks great and works well. I didn't make it. Someone else around here did. It works well though and doesn't use css to create it. If you want it, just put it into a script block.

Resident Geek

OK, I'm now convinced that it's the block that's causing this. I've gone in and created a brand new html file using your code. I've tried everything that I could think of. I even viewed it from my browser off of my local drive. It always looked perfect. For some reason, the block is causing those strange looking white spaces. The code that I gave earlier works. You might want to try it.
As far as your code goes...
Looks great...
Works great as HTML...
Just not in a code block.

Resident Geek

#15
HA! The Geek strikes again!  8)
Use this code in a script box!


<php
<LINK REL="stylesheet" TYPE="text/css" HREF="http://www.importantworkstuff.com/HTML/Includes/mainmenucss.css">
<div class="smalltext">
<div id="iwsmainmenu">
<ul id="navlist">
<font size="2"><b>Important Work Stuff</b></font>
<hr>
<font size="1">
<li id="active"><img src="http://www.importantworkstuff.com/Images/ForumMenu/home.gif"/>&nbsp;<a href="http://www.importantworkstuff.com/Forum/index.php">Home</a></li>
<li><img src="http://www.importantworkstuff.com/Images/ForumMenu/arcade.gif"/>&nbsp;<a href="http://www.importantworkstuff.com/Forum/index.php?action=arcade">Arcade</a></li>
<li><img src="http://www.importantworkstuff.com/Images/ForumMenu/online.gif"/>&nbsp;<a href="http://www.importantworkstuff.com/Forum/index.php?action=chat">Chat</a></li>
<li><img src="http://www.importantworkstuff.com/Images/ForumMenu/gallery.gif"/>&nbsp;<a href="http://www.importantworkstuff.com/Forum/index.php?action=gallery">Gallery</a></li>
<li id = "active"><img src="http://www.importantworkstuff.com/Images/ForumMenu/forum.gif" />&nbsp;<a href="http://www.importantworkstuff.com/Forum/index.php?action=forum"><b>Forum</b></a></font></b></li>
</font>
<br>
<font size="2"><b>Links</b></font>
<hr>
<font size="1">
<li><img src="http://www.importantworkstuff.com/Images/ForumMenu/links.gif"/>&nbsp;<a href="http://www.adultswim.com/" TARGET="_blank">Adult Swim</a></li>
<li><img src="http://www.importantworkstuff.com/Images/ForumMenu/links.gif"/>&nbsp;<a href="http://images.google.com/" TARGET="_blank">Google Images</a></li>
<li><img src="http://www.importantworkstuff.com/Images/ForumMenu/links.gif"/>&nbsp;<a href="http://www.wikipedia.org/" TARGET="_blank">Wikipedia</a></li>
<li><img src="http://www.importantworkstuff.com/Images/ForumMenu/links.gif"/>&nbsp;<a href="http://sports.yahoo.com/" TARGET="_blank">Yahoo Sports</a></li>
<li><img src="http://www.importantworkstuff.com/Images/ForumMenu/links.gif"/>&nbsp;<a href="http://www.youtube.com/" TARGET="_blank">YouTube</a></li>
</font>
</div></div>


As you can see, I merely turned it into php using "<php"
I then plugged it into the script box, and it comes up fine.

*Waits patiently for worshipful praise*  ;D


Hey devs! You may want to look into this as a bug with the HTML block!  ;)

bloc

No, its not a bug..the HTML/BBC code box will actually display spaces, linebreaks, just like a post in BBC code will..but also take on html statements. So if you write pure HTML, use a scriptbox block - or even php block.

mrbean17

#17
Awesome find RG, thanks much!


Resident Geek

No prob mrbean.
Bloc, I tried the php block first but got a strange parser error. I didn't feel like looking it up but here it is if you want it.

Parse error: parse error, unexpected '<' in c:\My website\forum\Sources\Errors.php(1733) : eval()'d code(35) : eval()'d code on line 1

Mrbean, I liked your menu so much I decided to switch from my current one. Do you mind?

IchBin

Geek, did you put the opening and closing php tags in your php block? Those are not required, and the error you got is often attributed to using those when they're not needed.

This website is proudly hosted on Crocweb Cloud Website Hosting.