...

View Full Version : Span Tag messing up alignment



kembreg
05-19-2012, 11:53 AM
I had to add a <span> around a number in order to create up a snippet markup.

<a href="../learn-spanish-reviews.php" class="linkText">
<span itemprop="votes">16</span> reviews
</a>

Attached is an image (IE8)
You will see that the '16' next to the word "reviews" is for some reason lower than the word 'reviews'

I thought the <span> tag was supposed to cause no effect at all.
Why would the <span> tag be affecting the aligment?

Thanks for your help

David

abduraooft
05-19-2012, 12:21 PM
<a href="../learn-spanish-reviews.php" class="linkText">
<span itemprop="votes">16</span> reviews
</a>
Are you able to reproduce the error with just that snippet (and no other HTML+CSS)?

kembreg
05-19-2012, 05:13 PM
Supreme Master coder Abduraooft,


Thank you for your reply.

Did I forget to included the image?
Here it is now.
The page is http://www.linguashop.com/learn/spanish.php
Without the <span> everything is ok.

Look forward to hearing from you.

David

Excavator
05-19-2012, 06:18 PM
Hello kembreg,
A good argument here for not resetting browser defaults. http://meiert.com/en/blog/20080419/reset-style-sheets-are-bad/



See what happens when you comment this out, see highlighted in red -
/*==========
RESET PART
==========*/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p,
blockquote, pre, abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp, small, strong,
sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, dialog, figure,
footer, header, hgroup, menu, nav,
section, time, mark,
audio, video {
margin:0;
padding:0;
border:0;
outline:0;
font-size:100%;
/*vertical-align:middle;*/
background:transparent
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum