SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Threaded View

  1. #1
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Burlington, Canada
    89 Post(s)
    6 Thread(s)

    Semantically Stinky?


    I am laying out a profile page. I wanted a persons name and their phone number on one line with the phone number being aligned right and the name aligned left. I then have address and email on the next line that follow the same right/left behaviour. I wanted this to be semantically correct and while it doesn't break any rules, I don't normally have more than one h2 at a time not seperated by a block level element like a <p> or <table> or <ul>... So the question does this grouping of h2's wreck the semantics?

    Here is the damage
    HTML Code:
    <h1 class='alignleft'>Name</h1>
    <h2 class='valign_bottom alignright'>Phone: 000 000-0000</h2>
    <div style="clear: both;"></div>
    <h2 class='cramp alignleft'>Street, City, Province, Postal Code</h2>
    <h2 class='cramp alignright'></h2>
    <div style="clear: both;"></div>
    And the CSS
    HTML Code:
    h1 { font-size: 1.5em; color: #336699;  }       
    h2 { font-size: 1.1em; color: #336699; }
    h1, h2, h3, h4, h5, h6, h7, .h1_bottom { font-family: 'Arvo', Georgia, Times, serif;}
    .alignleft {float: left;}    
    .alignright {float: right;}    
    .valign_bottom { margin-top: 1.2em;}
    .cramp { margin: -0.9em 0 0 0}
    I'd love to here your thoughts on this!

    Warm regards,
    Last edited by ServerStorm; Jan 14, 2013 at 19:59.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts