# Stylesheet not honored; directory access thwarted

**URL:** <https://www.ruby-forum.com/t/stylesheet-not-honored-directory-access-thwarted/152637>\
**Category:** Ruby\
**Created:** [November 5, 2008, 9:50pm UTC](https://www.ruby-forum.com/t/stylesheet-not-honored-directory-access-thwarted/152637 "2008-11-05T21:50:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RichardOnRails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Post date:** [November 5, 2008, 9:50pm UTC](https://www.ruby-forum.com/t/stylesheet-not-honored-directory-access-thwarted/152637/1 "2008-11-05T21:50:50Z")

</div>

Hi,

I intend to import CVS data from user-selected files a sub-directory  
withing a Rails app. I wrote a toy app outside the scope of Rails  
just to test this capability. The toy app is posted at  
[http://www.pastie.org/308209](http://www.pastie.org/308209).

The toy has a few blemishes:

1. I included CSS to center the link, but it’s rendered left-  
justified.
2. I expected the filenames in the imports sub-directory to be  
displayed, but they were not.

Any ideas?

TIA,  
Richard

---

<div class="post-metadata">

**Author:** ![RichardOnRails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Post date:** [November 5, 2008, 10:17pm UTC](https://www.ruby-forum.com/t/stylesheet-not-honored-directory-access-thwarted/152637/2 "2008-11-05T22:17:17Z")

</div>

On Wed, Nov 5, 2008 at 12:48 PM, RichardOnRails  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> The toy has a few blemishes:
> 
> 1. I included CSS to center the link, but it’s rendered left-  
> justified.

An anchor is not a block element, hence is only as wide as its content.  
(Also, the ‘position: relative’ is meaningless in the example shown.)

> 1. I expected the filenames in the imports sub-directory to be  
> displayed, but they were not.

I’m guessing you think that a URL can contain wildcards; it can’t.

If you use ` href="/imports/"` and your server allows directory listing,  
you’ll see the files listed.

HTH,

H\*

---

<div class="post-metadata">

**Author:** ![RichardOnRails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e0b2c6/32.png) [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Post date:** [November 6, 2008, 1:30am UTC](https://www.ruby-forum.com/t/stylesheet-not-honored-directory-access-thwarted/152637/3 "2008-11-06T01:30:33Z")

</div>

On Nov 5, 4:14 pm, Hassan S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > 1. I expected the filenames in the imports sub-directory to be  
> > –  
> > Hassan S. ------------------------ removed\_email\_address@domain.invalid

Hi Hassan,

Excellent guidance!

I got centering of my link working both with in-line styling and  
external CSS.  
And I also got a directory listing from Firefox.

You’re batting 1000. Thanks a lot!

Best wishes,  
Richard
