Solved

Create table with no borders/spacing

Posted on 2015-02-14
3
166 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 83

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 83

Expert Comment

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

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem to copy file 14 83
A responsive image gallery using flexbox 6 72
Set css in function 11 53
Sending HTML Formatted Email from ASP.NET 2 50
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

738 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