Solved

Create table with no borders/spacing

Posted on 2015-02-14
3
160 Views
Last Modified: 2015-02-14
What you are about to witness I'm sure is a disgrace to developers everywhere.

I've got five 64x64 social icons I want to place in a table next to each other horizontally with no spacing (or possibly a single pixel of spacing?) and align it on the right side of the screen. I want all the social icons to be on the same row, just one after the other. I'm getting a lot of spacing in between the images as it is now.

<div>
  <div>
 	<table class="no-spacing" cellspacing="0" align="right">
         <tr align="right">
           <td><a href="url"><img src="url" alt="Facebook" style="width:64px!important;height:64px!important"></a></td>
           <td><a href="url"><img src="url" alt="LinkedIn" style="width:64px!important;height:64px!important"></a></td>
           <td><a href="url"><img src="url" alt="Twitter" style="width:64px!important;height:64px!important"></a></td>
           <td><a href="url"><img src="url" alt="Google" style="width:64px!important;height:64px!important"></a></td>
           <td><a href="url"><img src="url" alt="YouTube" style="width:64px!important;height:64px!important"></a></td>
         </tr>
   	</table>
  </div>
  
  <br>
  <br>
  <br>
  <hr>
  
</div>

Open in new window


The important tags were recommended to me in another thread by a user because of the pixellation and/or distortion of the original image once I was linking it in the page. It works, so hopefully I can leave it.
0
Comment
Question by:Brent Arnold
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 40610419
This is both simpler and more irritating than you know.  Here's my demo http://www.dibsiam.net/dibsiam/IconRow/ .  If you look at the source code you will see there are no line breaks between the links.  That is because, at least in Firefox, if you put them in there they show up as spaces on the page.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>Icon Row</title>
<style type="text/css">
<!-- 
a:link {border:0;margin:0;padding:0;} 
img {border:0;margin:0;padding:0;} 
-->
</style>
</head>
<body>
Icon Row
<div align="right">
<a href="http://www."><img alt="ab (2K)" src="ab.jpg" height="64" width="64" /></a><a href="http://www."><img alt="ab (2K)" src="blue.jpg" height="64" width="64" /></a><a href="http://www."><img alt="ab (2K)" src="blueston.jpg" height="64" width="64" /></a><a href="http://www."><img alt="ab (2K)" src="bluesurf.jpg" height="64" width="64" /></a><a href="http://www."><img alt="ab (2K)" src="cb.jpg" height="64" width="64" /></a></div>
</body>
</html>

Open in new window

0
 
LVL 3

Author Closing Comment

by:Brent Arnold
ID: 40610424
Absolutely on point answer, exactly what I needed. Thanks for your time and expertise, Dave!
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 40610452
You're welcome, glad to help.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now