Solved

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

Posted on 2007-11-30
7
1,405 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 200 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 300 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
Industry Leaders: 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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

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…
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

695 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