vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   CSS Problem (https://vborg.vbsupport.ru/showthread.php?t=147078)

johnstires 05-12-2007 01:22 PM

CSS Problem
 
Can someone help me figure out why this button works in FF but not in IE...

button: VIDEO - take yoga now, for free!

http://www.prenatalyogacenter.com/cm....php?page=test

Here is the code and css I am using.

Code:

Code:

<tr>
<td class="$getbgrow">
<div class="pycbutton"><a href="http://www.prenatalyogacenter.com"><h2>VIDEO - take yoga now, for free!</h2></a></div>
<td>
<tr>

CSS

Code:

.pycbutton {
height:32px;
width:390px;
background:url(http://www.prenatalyogacenter.com/forums/images/buttons/pyc_button.gif) no-repeat scroll 0%
}

.pycbutton h2 {
height:32px;
width:390px;
background-repeat:no-repeat;
font-size:14px;
font-weight:bold;
letter-spacing:normal;
line-height:32px;
padding-left:10px;
position:relative;
color:#9766C3;
}


nexialys 05-12-2007 03:08 PM

can you point what is not working exactly?!

and actually, to make it XHTML compliant, the <a have to be inside the <h2, not the opposite!

RedTyger 05-12-2007 03:34 PM

Your background CSS is pretty badly borked, don't know if that'd be catastropic but it's not good form.

Replace:
background:url(http://www.prenatalyogacenter.com/fo...pyc_button.gif) no-repeat scroll 0%

With:
Code:

background:transparent url(http://www.prenatalyogacenter.com/forums/images/buttons/pyc_button.gif) center center no-repeat;

Note I added the missing closing ; as well.

nexialys 05-12-2007 04:09 PM

Quote:

Originally Posted by RedTyger (Post 1246290)
Note I added the missing closing ; as well.

the last element of a css entity does not require a closing... even on W3C they don't apply it... anyway it is always cleaner to add everything into place, so you never miss a thing.. :)

johnstires 05-12-2007 05:40 PM

Quote:

Originally Posted by RedTyger (Post 1246290)

Replace:
background:url(http://www.prenatalyogacenter.com/fo...pyc_button.gif) no-repeat scroll 0%

With:
Code:

background:transparent url(http://www.prenatalyogacenter.com/forums/images/buttons/pyc_button.gif) center center no-repeat;

Note I added the missing closing ; as well.

Thanks for the responses. As you can see I'm a bit of a hack. Your fix did not work. SHould center be there twice?

I use firebug addon to help troubleshoot css problems in FF. What can I use to help troubleshoot in IE. I wish more people used FF...:(

Princeton 05-12-2007 06:32 PM

I see 2 links with "VIDEO - take yoga now, for free!" ...

the top link has some javascript in the following form:
Code:

<a href="javascript<b></b>:var target=window.open('http://link.brightcove.com/services/player/bcpid823619092','PrenatalYogaAlleviatingBackPain',  'scrollbars=no,resizable=no,status=no,width=510,he  ight=610');">
notice the <b></b>? .. it shouldn't be there

the second link works in FF and IE

I recommend closing all tags .. otherwise, your html may not degrade well in other browsers. It's best to play it safe.

FYI: Over 50% of vbulletin.org visitors use FireFox.

Princeton 05-12-2007 06:33 PM

By the way, Firebug is an excellent tool. :up: I use it everyday.

I highly recommend it as a must-have tool for web developers.

johnstires 05-12-2007 08:52 PM

Quote:

Originally Posted by Princeton (Post 1246367)
I see 2 links with "VIDEO - take yoga now, for free!" ...

the top link has some javascript in the following form:
Code:

<a href="javascript<b></b>:var target=window.open('http://link.brightcove.com/services/player/bcpid823619092','PrenatalYogaAlleviatingBackPain',  'scrollbars=no,resizable=no,status=no,width=510,he  ight=610');">
notice the <b></b>? .. it shouldn't be there

the second link works in FF and IE

I recommend closing all tags .. otherwise, your html may not degrade well in other browsers. It's best to play it safe.

FYI: Over 50% of vbulletin.org visitors use FireFox.

I have 2 links in there as it is just a test page. That's wierd bold tags are being added there, probably because I placed the brightcove script inside bbcode. I'll make it a template.


All times are GMT. The time now is 07:11 AM.

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.01044 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete