SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2010
    Posts
    52
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to remove padding & margins using inline css

    it's been a while since I messed with much html and css so I forget if it's possible to remove the padding and margin from an image with inline css. is it possible? if not, I suppose I'll have to use internal css.

    example:

    Code:
    <a href="http://test.com" title="test link">Test Link<img src="http://test.com/test.jpg" alt="test logo" /></a>
    Thanks,

    Andrew

  2. #2
    Quality not quantity. bo5ton's Avatar
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    654
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Inline CSS would read:

    Code:
    <a href="http://test.com" title="test link" style="margin:0;padding:0;">Test Link<img style="margin:0;padding:0;" src="http://test.com/test.jpg" alt="test logo" /></a>

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2010
    Posts
    52
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bo5ton View Post
    Inline CSS would read:

    Code:
    <a href="http://test.com" title="test link" style="margin:0;padding:0;">Test Link<img style="margin:0;padding:0;" src="http://test.com/test.jpg" alt="test logo" /></a>
    thanks a bunch!

  4. #4
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,624
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Just to forewarn you, there are some pretty big disadvantages of using inline styling. I just thought you should know that inline styling isn't really the best option.
    Always looking for web design/development work.
    http://www.CodeFundamentals.com


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
  •