vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   strike through (https://vborg.vbsupport.ru/showthread.php?t=205316)

snakes1100 02-15-2009 03:52 PM

Quote:

Originally Posted by badheeu (Post 1744960)
this way is better, without writing banned

<span style="text-decoration: line-through;"/span>

Why is that?

1. It don't have a title in it ie. BANNED, without inputing the word BANNED, it will display nothing.

2. The tag is broken, ie. it invalidates the page markup, the page is no longer xhtml compliant as you didnt close the opening or closing span tag.

TigerC10 02-15-2009 04:23 PM

Quote:

Originally Posted by snakes1100 (Post 1744980)
Quote:

Originally Posted by badheeu (Post 1744960)
this way is better, without writing banned

<span style="text-decoration: line-through;"/span>

Why is that?

1. It don't have a title in it ie. BANNED, without inputing the word BANNED, it will display nothing.

2. The tag is broken, ie. it invalidates the page markup, the page is no longer xhtml compliant as you didnt close the opening or closing span tag.


He was trying to write:
Code:

<span style="text-decoration: line-through;" />
Instead of wrapping the span tag around the word banned, you just end it with a "/" symbol to say "only apply it to the word that follows" - but you would still need the word "Banned" after the span tag.

I consider this bad programming practice, for something like a span, or a div - you should really have it wrapped around the text. There's some tags that are okay like that... singular tags like <br /> or <hr /> that don't have closing tags. Or if you have a cell in a table that has no data in it, <td /> is acceptable. But some older browsers don't know what to do with that syntax, so they just apply it to everything until they reach a closing tag. Rare as it may be to see someone using IE4, it happens from time to time.

snakes1100 02-15-2009 04:26 PM

Quote:

Originally Posted by TigerC10 (Post 1745026)
He was trying to write:
Code:

<span style="text-decoration: line-through;" />
Instead of wrapping the span tag around the word banned, you just end it with a "/" symbol to say "only apply it to the word that follows" - but you would still need the word "Banned" after the span tag.

I consider this bad programming practice, for something like a span, or a div - you should really have it wrapped around the text. There's some tags that are okay like that... singular tags like <br /> or <hr /> that don't have closing tags. Or if you have a cell in a table that has no data in it, <td /> is acceptable. But some older browsers don't know what to do with that syntax, so they just apply it to everything until they reach a closing tag. Rare as it may be to see someone using IE4, it happens from time to time.

That is why i posted what i did, its still bad coding, to be xhtml compliant it has to be closed to be valid.


All times are GMT. The time now is 08:12 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.01068 seconds
  • Memory Usage 1,727KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete