Solved

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

Posted on 2007-11-30
7
1,391 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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now