SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Evangelist
    Join Date
    Nov 2004
    Location
    Netherlands
    Posts
    541
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exchange h2 into a <p>?

    Hi,

    I have to put the information which is within the h2 tag into a normal one. Before I mess up the lay-out of this small block I hope I can have some suggestions.

    Is it possible to write instead of <h2> following <p class="anyclassname">?

    Below the html and the full css for this block.

    Thanks for replying.

    Mathilde


    Code:
    <div class="livechat">
    <h3>Support</h3>
    <h2>phone number here</h2>
    <h2>phone number here</h2>
    <p>
    <a href="#" title=""><span style="text-transform: uppercase;">International Numbers</span></a>
    <br>
    mon. - fri. 09.00 - 17.00 (C.E.T.)
    <br>
    email here
    </p>
    </div>
    Code:
    /* contact block */
    .livechat h3 {
    
    	color: #6b412e;
    	text-align; left;
    	margin: 8px 0px 0px 10px;
    	padding: 0px 0px 0px 0px;
    
    }
    
    .livechat h2 {
    
    	background-image: url("../images/phone.jpg");
    	background-position: left center;
    	background-repeat: no-repeat;	
    	color: #6b412e;
    	text-align; left;
    	font-size: 12px;
    	height: 16px;
    	line-height: 14px;
    	border-bottom: 0px;
    	margin: 17px 0px 0px 10px;
    	padding: 0px 0px 0px 21px;
    
    }
    
    .livechat img {
    
    	margin: 10px 0px 0px 15px;
    	padding: 0px 0px 0px 0px;
    
    }
    
    .livechat {
    
    	border: 1px solid #e0d6a4;
    	text-align; left;
    	width: 298px;
    	height: 150px;
    	float: left;
    	background-image: url("../images/supportbg.jpg");
    	background-position: right bottom;
    	background-repeat: no-repeat;
    	margin: 5px 0px 10px 0;
    	padding: 0px 0px 0px 0px;
    
    }
    
    .livechat p {
    	
    	font-size: 11px;
    	color: #444;
    	font-weight: normal;
    	line-height: 16px;
    	margin: 3px 0px 0px 10px;
    	padding: 0px;
    
    
    
    }

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,112
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by dancing-mathilde View Post
    Is it possible to write instead of <h2> following <p class="anyclassname">?
    Certainly it is. And it sounds like a good idea, too, as you have h2s below an h3, which makes no sense from a semantic point of view. What h2 are you replacing?
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    SitePoint Evangelist
    Join Date
    Nov 2004
    Location
    Netherlands
    Posts
    541
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Ralph,

    The h2 is in the side column of the page and was for the phone number(s). Now I have a better look at the coding I noticed the h3 - h2 order + the use of the h2 tag for some unimportant piece of content (SEO point of view). I already made the side column headers h3 not to take full attention of the main content.

    So in the css I write .livechat p anyname {the coding here}

    in html <p class="anyname">phone numbers</p>

    Mathilde

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,112
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    in the css I write .livechat p anyname {the coding here}
    That would need to be

    Code:
    .livechat p.anyname {the coding here}
    to work.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  5. #5
    SitePoint Evangelist
    Join Date
    Nov 2004
    Location
    Netherlands
    Posts
    541
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    changed and woring well. Thanks.

  6. #6
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Though semantically a list of phone numbers is a list, not bunch of paragraphs... and if you have a whole bunch of them in a row, style off the parent instead of wasting bandwidth putting a class on every one of them.


Bookmarks

Posting Permissions

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