Solved

Create table with no borders/spacing

Posted on 2015-02-14
3
163 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 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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

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…
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 the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

770 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