Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 04-03-2004, 01:27 PM
Grover Grover is offline
 
Join Date: Nov 2001
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default [CSS] Need assistance on using CSS inside postings.

Hi,

I am a newbie on CSS, so bare with me...

I am trying to learn this language, because I want to make the contents of specific postings look different inside my VB forum. I have almost achieved the thing I want (which is altogether a BIG achievement: good work Grover! :bored: ), but I am not quite there yet.

I have the following piece of code (draft example):

HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" lang="en">
<head>
<title>FAQ TOC Layout</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="generator" content="blah"/>
<meta name="keywords" content="" />
<meta name="description" content="blah" />
<!-- CSS Stylesheet -->
<style type="text/css">
<!--
/* CSS Style */
body
{
background-color: #E1E1E2;
color: #000000;
font: 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
margin: 5px 10px 10px 10px;
}
/* THE CODES BELOW SEEM TO SET THE STYLE FOR LINKS IN MSIE, BUT
IN FIREFOX... THEY SEEM TO BE OVERRULED BY THE '.TOCLEVEL A'-RULES */
a:link
{
color: #22229C;
}
a:visited
{
color: #22229C;
}
a:hover, a:active
{
color: #FF4400;
}
---------------- 
.page
{
background-color: #FFFFFF;
color: #000000;
}
 
/* ***** Custom CSS for displaying FAQ TOC's ***** */
.toclevel1 {
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
color: #0082FF;
font-size: 20px;
} 
.toclevel1 a {
border: 1px solid #F5F5FF;
text-decoration: none;
background: #F5F5FF;
padding: 0.15em 0.5em;
color: #3E73A1;
line-height: 2em;
}
.toclevel1 a:hover {
background-color: #eee;
text-decoration: none;
border: 1px solid #ccc;
} 
 
.toclevel2 {
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
color: #0082FF;
font-size: 15px;
}
.toclevel2 a {
color: #0082FF;
text-decoration: none;
text-decoration: none;
background: #F5F5FF;
padding: 0.15em 0.5em;
border: 1px solid #F5F5FF;
line-height: 2em;
}
.toclevel2 a:hover {
text-decoration: none;
background-color: #eee;
border: 1px solid #ccc;
} 
.toclevel3 {
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
color: #708090;
font-size: 14px;
}
.toclevel3 a {
color: #708090;
text-decoration: none;
text-decoration: none;
background: #F5F5FF;
padding: 0.15em 1.5em;
border: 1px solid #F5F5FF;
line-height: 1.7em;
}
.toclevel3 a:hover {
text-decoration: none;
background-color: #eee;
border: 1px solid #ccc
}
-->
</style>
<!-- / CSS Stylesheet -->
 
</head>
<body onload="">
 
<div class="page" style="width:100%; text-align:left">
 
<!-- message -->
<div><font size="4"><font color="dimgray">FAQ TOC</font> <font color="darkorange">Layout</font></font><br />
<font color="gray">-------------------------------------------------------------</font><br />
<br />
<span class="toclevel1"><a href="#testlink">1. What is The Marsupilami?</a></span><br />
<span class="toclevel2"><a href="#testlink">1.1. What does he eat</a></span><br />
<span class="toclevel3"><a href="#testlink">1.1.1. Apple(s)?</a></span><br />
<span class="toclevel3"><a href="#testlink">1.1.2. Bananas</a></span><br />
<span class="toclevel3"><a href="#testlink">1.1.3. Pears</a></span><br />
<span class="toclevel2"><a href="#testlink">1.2 How does he eat it?</a></span><br />
<span class="toclevel2"><a href="#testlink">1.3 Why does he eat it?</a></span><br />
<span class="toclevel2"><a href="#testlink">1.4 Why doesn't he throw it away then?</a></span><br />
<span class="toclevel1"><a href="#testlink">2. Who is Grover?</a></span><br />
<span class="toclevel2"><a href="#testlink">2.1 The story about the cape</a></span><br />
<span class="toclevel2"><a href="#testlink">2.2 Facts about your little monster</a></span><br />
<span class="toclevel2"><a href="#testlink">2.3 Ernies' best friend</a></span><br />
<br />
<font color="#808080">-------------------------------------------------------------</font><br />
<font color="#808080"><font color="dimgray">FAQ TOC</font> <font color="darkorange">Layout </font><font color="dimgray">(c) 2004 Limelight Studio's</font><br />
<font color="#808080">-------------------------------------------------------------</font><br />
<font color="silver">-</font><br />
</font></div>
<!-- / message -->
</body>
</html>
It is actually a VB3 message-output stripped to the bone.

When I save this code as .html and open it in FireFox 0.8 it looks (the colours of the textlinks) like it should. (screenshot2). But when I open it in MSIE 6.0 it looks (the colours of the textlinks) not like it should (screenshot1).

It seems like MSIE6.0 uses the codes below to set the style for LINKS, but in FireFox they seem to be overruled by the '.toclevel a'-rules i've constructed.

HTML Code:
a:link 
{
color: #22229C;
}
a:visited
{
color: #22229C;
}
a:hover, a:active
{
color: #FF4400;
}
Can someone assist me on this? What do I need to change so MSIE displays the colours in the same way as FireFox does?

The SPAN statements '< span class="toclevel1" >Here goes the Textlink< /span > are generated by Custom BBCode I use. I don't know if this is the right way to style a specific textline/link, but this is the way I thought it would work....

I would appreciate any help very much,
Attached Images
File Type: gif FAQ TOC Layout IE60.gif (14.6 KB, 0 views)
File Type: gif FAQ TOC Layout FireFox.gif (16.7 KB, 0 views)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:11 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03249 seconds
  • Memory Usage 2,234KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (2)postbit_attachment
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete