Solved

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

Posted on 2007-11-30
7
1,400 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
  • 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
need to fire confirm() popup window in IE using VBA 2 22
Html Table Looping (part 2) 5 27
Button function on table is in trouble 3 22
Using Specialized Fonts in CSS 1 25
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
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 code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
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).

828 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