Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorhebel
    • CommentTimeMar 30th 2006
     permalink
    I'm using hover span to pop a css box above a link. It works well but I'm having to style the contents of the span box using <p class> e.g.
    p.line1
    {
    font-size:1.2em; font-weight:bold; background:#9c0; color:white; padding:3px 10px 3px 10px;
    }
    p.line2
    {
    font-size:0.9em; line-height:1.8em; color:white; padding:8px 10px 8px 10px;
    {

    although this method works fine in ie 6 & 7, firefox, opera, etc, the webpage doesn't validate. Does anyone know of another method I could use.

    Thanks for reading this.
    •  
      CommentAuthortsk
    • CommentTimeMar 30th 2006
     permalink
    if you are using a <p> tag inside a <span> it won't validate as it comes in contrast to the W3C rules. May we see a HTML markup ?
    • CommentAuthorKanashii
    • CommentTimeMar 30th 2006 edited
     permalink
    Edit: -points above-
    • CommentAuthorhebel
    • CommentTimeMar 30th 2006
     permalink
    My pleasure:

    <div id="links">

    <a href="#nogo">link1<span>
    <p class="line1">example text</p>
    <p class="line2">example text<br />
    example text<br />
    example text</p>
    </span></a>

    </div>
    •  
      CommentAuthornifkin
    • CommentTimeMar 30th 2006 edited
     permalink
    If you change your Ps to SPANs and set them to display:block in your CSS and i think you should be able to get away with it.
    • CommentAuthorhebel
    • CommentTimeMar 30th 2006
     permalink
    Mr. Nifkin, you are a genius.
    It works perfectly and now validates. I really would like to really thank you a lot. I've puzzled over this for days trying various ways to make it validate and never once did I think about spans inside spans.
Add your comments
    Username Password
  • Format comments as (Help)