#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2013
    Posts
    2
    Rep Power
    0

    Problem with HTML code


    Hello to all people!

    I created a html code and I need your help.
    Actually, I want to disable space between text and picture.

    Do you know how I can do that??

    The html code is that:

    Code:
    <a href="http://www.google.com" target="_blank"><div style="background:#000000; padding:0px 8px 1px 8px;"><center><b>
    <p style="font-family:cambria;color:#FFFFFF;font-size:35px;text-decoration:none;">THE NAME <br />OF MY PET</p></b></center></div>
    <img src="http://imageshack.us/a/img42/2176/flowers5q.jpg" width="410" height="300" /></a>
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    My eyes are bleeding. Before you worry about the layout, you should first repair your HTML.

    1. Validate your stuff.
    2. Fix the bugs.
    3. Throw out the ancient center element.
    4. Get rid of the inline CSS which makes the markup almost impossible to read.
    5. Consider getting rid of the stupid target attribute. How I open your links in my browser really is none of your business.

    Then take care of the space issue (you'll need to remove the bottom margin from the paragraph).
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2013
    Posts
    2
    Rep Power
    0
    I created NEW code with which I disable space between text and picture...But under picture is small "piece" of
    background's color, WHY??

    My NEW code is:

    Code:
    <a href="http://www.google.com" target="_blank">
    <h2 style="background-color:#000000;text-align:center;">
    <b>
    <p style="font-family:cambria;color:#FFFFFF;font-size:35px;text-decoration:none;">THE NAME <br />OF MY PET</b><br />
    <img src="http://imageshack.us/a/img42/2176/flowers5q.jpg" width="410" height="300" /></a></h2>

IMN logo majestic logo threadwatch logo seochat tools logo