?
Solved

How to create a dotted table border using a 1 pixel image

Posted on 2007-11-30
7
Medium Priority
?
1,407 Views
Last Modified: 2012-08-13
Hi All,

How can I create a dotted border using a 1 pixel dotted image around a 200 * 200 table thats  "cross browser" compatible?

I tried using the dotted feature of style sheet, but it was rendering things different in different browsers. As I was googling around, somebody mentioned that you will need to use an image to generate a cross browser .

here is a sample code I am trying to play with. I am able to generate the dots horizontally, but not able to create a vertical dotted line for that square table. I am looking at IE 6, & FF2 on Pc

<style type="text/css">
 
#dots { width:200px; background-image: url("/images/grey-dot2.gif"); padding:2px; background-color:#fff; }
#main { background-color:#fff; }
 
</style>
</head>
<body>
<div id="dots">
<table id="main" width="200" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="200" height="200">&nbsp;</td>
  </tr>
</table>
</div>

Open in new window

0
Comment
Question by:dynamota
[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
  • 3
  • 2
7 Comments
 
LVL 12

Assisted Solution

by:Sinoj Sebastian
Sinoj Sebastian earned 800 total points
ID: 20383620
I think you can use dotted border
<style type="text/css">
  #div1 {border:1px dotted black;}
</style>
 
<div id="div1">test <br> test<div>

Open in new window

0
 
LVL 29

Accepted Solution

by:
Göran Andersson earned 1200 total points
ID: 20387723
Maybe your image is wrong? It looks nicely dotted to me, all around:

#dots { width:200px; background: #fff url("http://www.guffa.com/temp/chess.gif"); padding:2px; }

Tested in IE6, IE7, Firefox 2.
0
 
LVL 1

Author Comment

by:dynamota
ID: 20388274
greenGhost,
You are right. The image we were given was not designed correctly. And hence it displayed things incorrectly.

sinoj & GreenGhost, tx much for all the help.





0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:dynamota
ID: 20388299
GreenGhost & Sinoj, I ended up splitting points incorrectly. Wanted to give gg the 300 as he was able to my question with respect to the image. I am hoping that the admin can help fix the points

0
 
LVL 12

Expert Comment

by:Sinoj Sebastian
ID: 20388361
>> I am hoping that the admin can help fix the points
Post a request to reopen the thread here
http://www.experts-exchange.com/Community_Support/General/
and assign the points as you wish

Glad to help you :)
0
 
LVL 1

Author Comment

by:dynamota
ID: 20391034
Thank you all very much ...
0

Featured Post

7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

800 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