Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Independent dotted line

Independent dotted line
Thread Tools
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Jul 27, 2005, 11:44 AM
 
Hi, this seems to work well in Safari and Firefox. Can someone check it in Explorer on Windows or suggest an alternative method.

Code:
<p style="letter-spacing: 300px; border-top: dotted 1px #999999;">&nbsp;</p>
Is there any way to adjust the spacing of the dots in CSS?

Thanks!
     
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Jul 27, 2005, 11:51 AM
 
Windows delivers a dotted line in Explorer (IE 6), although in Firefox for windows it renders as an unbroken line.
     
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Jul 27, 2005, 11:58 AM
 
Interesting why would there be a render difference between Firefox for Mac and Windows? They use the same render engine...

Are the line lengths different as well?
     
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Jul 27, 2005, 12:03 PM
 
Originally Posted by headbirth
Are the line lengths different as well?
No, it stretched to fit the table cell I through it into on both browsers, altering the "letter-spacing" attribute has no effect.
     
Grizzled Veteran
Join Date: Oct 2003
Status: Offline
Reply With Quote
Jul 27, 2005, 02:22 PM
 
Windows IE doesn't render dotted lines... instead they show up as dashed lines.
The only thing necessary for evil to flourish is for good men to do nothing
- Edmund Burke
     
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Jul 28, 2005, 03:38 AM
 
alternative method? this get dashs in win IE and and blocks in win firefox

Code:
<hr size=1 width=100% color=#882233 style='border: dotted;'>
Try throwing "<hr> dotted" into Google.
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Jul 28, 2005, 08:25 AM
 
Originally Posted by headbirth
Code:
<p style="letter-spacing: 300px; border-top: dotted 1px #999999;">&nbsp;</p>
Try flipping the 'dotted' and '1px' in your border-top delcaration, so you have "1px dotted #999999". That's how the standard says to write the shorthand. Putting them out of order may be causing trouble.
Is there any way to adjust the spacing of the dots in CSS?
Do you want more space between the dots, or do you want the dots themselves to be longer? There's no way to do the former, but you can substitute 'dashed' for 'dotted' to get the latter. This doesn't quite work in IE, which understands both 'dotted' and 'dashed' but always renders the border as if you'd said 'dashed' anyway.

Unfortunately, there is currently no way to get any finer-grained control over your borders than that. CSS3 promises more, but that's a long way off.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Jul 28, 2005, 09:06 AM
 
Um, you could do something along the lines of this. (If you'll excuse my php)

[php]
<html>
<head></head>
<body>
<table><tr>
<?php
for($i=0;$i<20;$i++){
echo "<td width=1px style= \"border-top: 1px solid #999999;\">&nbsp;</td>";
echo "<td width=10px style= \"border-top: 1px solid #FFFFFF;\">&nbsp;</td>";
}
?>
</tr></table>
</body>
</html>
[/php]
     
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Jul 28, 2005, 10:55 AM
 
Wow! great suggestions guys.

Thanks!
     
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Jul 28, 2005, 11:23 AM
 
Don't put a table in to fake a line.

No, you have no control over the dot spacing in a dotted line. And old browser will only display a dashed line or a solid line (IE6 is an old browser).

If you want a line that looks different than a browser's default, create an image of it, and use it as a background image positioned how you want it, and set it to repeat-x if necessary.
     
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Jul 28, 2005, 11:56 AM
 
Originally Posted by registered_user
Don't put a table in to fake a line.
Oh come on, where's your sense of adventure?

Check this out.

[php]
<html>
<head></head>
<body>

<?
for($i=0;$i<20;$i++){
echo "<hr width=1px>";
echo "<hr width=10px style= \"display:none;\">";
}
?>

</body>
</html>
[/php]

result

(If you wanted a verticle jobbie that is)
     
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Jul 28, 2005, 12:48 PM
 
You could do this too, but it's an equally terrible idea.

<?php
echo "<nobr>";
for($i=0; $i<100; $i++) {
echo "<font size=2>.</font><font size=5>$nbsp;</font>";
}
echo "</nobr>";
?>
     
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Jul 28, 2005, 01:00 PM
 
added to "result"
     
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Jul 28, 2005, 01:16 PM
 
heh, I put $nbsp; instead of &nbsp; that's an oopsie
     
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Jul 28, 2005, 01:18 PM
 
adjusted
     
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Jul 28, 2005, 01:20 PM
 
working in win IE and firefox, btw
     
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Jul 29, 2005, 09:55 AM
 
The hr dotted rule method worked great ... I changed it to this for my particular use:

Code:
<hr size=1 width=100% color=#FFFFFF style="border-top: 1px dotted #999999;">
I know my code is a bit screwy .. tends to happen when 1. your a novice and 2. your experimenting. I have to go through and do some cleaning, but I was wondering if someone in there spare time could check this site in windows ie and firefox. it works fine in safari and firefox on the mac ... here are two screen captures to show what it should look like.

http://www.nomadicmind.com/Client/Screen1.png
http://www.nomadicmind.com/Client/Screen2.png


thanks!

oh ... one other question. does anyone bother testing in the old ie for mac? i ran this site through and altough it displays correctly the links and rollovers for the work section don't function.
     
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Jul 29, 2005, 10:04 AM
 
Apart from a Javascript error (issue with document.pre1 not being defined or something), everything seems hunky dory in Win IE6 and Firefox.

And, er, don't mention ie for Mac, I just spent a few hours manufacturing a menu that doesn't render in that abortion of a browser.

Ever considered getting a PC out of some dumpster to check for win IE compatibility? It's what most of the web viewing audience will be using.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:23 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2