Hi,
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
And the CSSHTML 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'>user@example.com</h2> <div style="clear: both;"></div>
I'd love to here your thoughts on this!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}
Warm regards,
Steve




Reply With Quote




Bookmarks