?
Solved

Create table with no borders/spacing

Posted on 2015-02-14
3
Medium Priority
?
168 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
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)
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

771 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