Color code help.

Discussion in 'HTML & Website Design' started by eazy00, Aug 27, 2011.

  1. #1
    The text should all be together, but as you can see, it's now split up. What am I doing wrong or missing here?? http://autoglassrescue.com/contact-us-now

    It all looks good until I enter the color code.

    Code I used: <font size="2">Thank you for contacting <em><p style="color:#E16222">Auto Glass Rescue</p></em>! Please leave your question, comment or concern in the message box below.
    For a windshield repair/installation quote or related questions, please provide the following: Vehicle year, make, model and a short description. Note: <u>You will recive a confirmation email that we recived your message. If you don't recive a confirmation email, please check your email accuracy, then try sending again.</u></font>


    Thanks!
     
    Last edited: Aug 27, 2011
    eazy00, Aug 27, 2011 IP
  2. pritesh3232

    pritesh3232 Well-Known Member

    Messages:
    213
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #2
    The code should be like this below if you want to put all text without space.

    <font size="2">Thank you for contacting <em><p style="color:#E16222">AutoGlassRescue</p></em>!

    Let me know if i get it wrong.

    Thanks
     
    pritesh3232, Aug 27, 2011 IP
  3. babar.mangi

    babar.mangi Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Try this...........

    <font size="2">Thank you for contacting<em><p style="color:#E16222;"></em>!
     
    babar.mangi, Aug 27, 2011 IP
  4. ethikz

    ethikz Peon

    Messages:
    92
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I would like to intervene and tell you that the font tag is deprecated in HTML 4. You need to use stylesheets for formatting of elements. You can still use the code but it will not pass validation, which in turn can hurt your SEO.

    About your code above, it is wrong. You need to use it as posted below.

    
    <p style="font-size:x-small">Thank you for contacting <span style="color:#E16222"><em>AutoGlassRescue</em></span></p>
    
    Code (markup):

    Another way to do this with minimal coding is combining some inline elements like so:
    
    <p style="font-size:x-small">Thank you for contacting <span style="color:#E16222; font-style:italic">AutoGlassRescue</span></p>
    
    Code (markup):

    "p" is a block-level element where as "em" and "span" are inline elements.
    You should never place inline elements before block-level elements.

    I hope this clears it up. If not then ask questions and I'll respond as fast and accurate as possible
     
    ethikz, Aug 28, 2011 IP