Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Apr 2004
    Posts
    74
    Member #
    5667
    hello everyone. im having a problem getting my markup validated and i was wondering if anyone had any ideas.
    the problem is this...
    im using the span tag to get the effect of an image appearing when you hover a link.
    when i try to validate the code w3c tells me i cant use a block level element (h3) inside a span tag. but this is the only way i can think of to get the desired effect.
    check it out at http://www.azmusicnet.com/clone.html
    hover over the services or contact link and youll see what im after.

    thanks in advance!
    Jeff Mills

  2.  

  3. #2
    Senior Member Trico's Avatar
    Join Date
    Feb 2004
    Location
    Nottingham, UK
    Posts
    894
    Member #
    5081
    Try using a <div>, but apply CSS display: inline; to it instead of using a <span>.

    My first idea at a glance.

  4. #3
    Member
    Join Date
    Apr 2004
    Posts
    74
    Member #
    5667
    hmmm..not sure i know how to go about doing that. this isnt my code, im just trying to learn from it.
    youre saying to make another div that will display when i hover over a link in a different div?
    Jeff Mills

  5. #4
    Senior Member Trico's Avatar
    Join Date
    Feb 2004
    Location
    Nottingham, UK
    Posts
    894
    Member #
    5081
    im having a problem getting my markup validated
    this isnt my code
    Sorry I'm not with you?

    Where is your site so I can see what you're talking about?

    What I'm suggesting is this... this works on the basis that you do actually need your heading wrapped inside an inline element?
    Code:
    <div style="display: inline;">
    <h3>Contact us</h3>
    Here you could put the address and telephone # of your place. And also let them know that they can e-mail you by clicking on the link!
    </div>

  6. #5
    Member
    Join Date
    Apr 2004
    Posts
    74
    Member #
    5667
    yeah what theyre saying is i cant have a block level element wrapped inside an inline element.
    not my code meaning the idea isnt original. i got this idea from css/edge.
    heres my css:

    div#links {
    position: absolute;
    top: 10px;
    left:645px;
    width: 110px;
    height: 125px;
    padding: 2px;
    font: 12px georgia;
    z-index: 100;
    }
    div#links a {
    display: block;
    text-align: left;
    font-family: georgia;
    padding: 2px;
    margin: 1px;
    border: 1px solid #000;
    text-decoration: none;
    color: #000;
    }
    div#links a:hover {
    color: #000;
    width: 100%;
    text-decoration: none;
    background-image: url('background4.gif');
    }
    div#links a span {
    display: none;
    }
    div#links a:hover span {
    display: block;
    position: absolute;
    top: 266px;
    right: 0px;
    width: 450px;
    height: 105px;
    color: #000;
    z-index: 100;
    padding: 5px;
    margin: 5px;
    font-family: georgia;
    text-decoration: none;
    text-align: justify;
    border: 1px solid #000;
    border-right: 3px solid #000;
    border-bottom: 3px solid #000;
    }

    div#links a:hover span h3 {
    font-family: arial;
    font-size: 18px;
    margin-bottom: 2px;
    text-align: justify;
    text-decoration: underline;
    }
    heres the html:
    <a href="?">text<span>description that will appear in lower box</span></a>
    this wont validate. i was tyring to find another way to do it so it would.
    Jeff Mills

  7. #6
    Senior Member Trico's Avatar
    Join Date
    Feb 2004
    Location
    Nottingham, UK
    Posts
    894
    Member #
    5081
    The method I already mentioned above gets rid of the validation conflict you spoke of. If you don't understand it now, you will have to go away and learn HTML and CSS in more depth.

  8. #7
    Member
    Join Date
    Apr 2004
    Posts
    74
    Member #
    5667
    yeah........hence the reason i posted here.
    Jeff Mills

  9. #8
    Member
    Join Date
    Apr 2004
    Posts
    74
    Member #
    5667
    nevermind.got it figured out. thanks though.
    i just styled the <b> tag since i was gonna use it anyway, then threw a line break in there....dont know why i didnt think of that b4.
    Jeff Mills

  10. #9
    Member
    Join Date
    Apr 2004
    Posts
    74
    Member #
    5667
    *tisk tisk*
    no need for all that.
    Jeff Mills


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:57 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com