Solved

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

Posted on 2007-11-30
7
1,398 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
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 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…

786 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