Jezen Thomas
Jezen Thomas

Reputation: 13800

Styling MAMP localhost

Is it possible to apply some CSS to the 'Index of /' page on localhost in MAMP? I've been digging around in /Applications/MAMP/bin/mamp/ but I can't find where to link to the CSS from.

Upvotes: 1

Views: 1372

Answers (1)

Jezen Thomas
Jezen Thomas

Reputation: 13800

I decided to do this with a Chrome extension. The extension needs two files:

manifest.json

{
  "name": "Pretty localhost",
  "version": "1.0",
  "description": "A much prettier localhost",
  "content_scripts": [
    {
      "matches": ["http://localhost/"],
      "css": ["styles.css"]
    }
  ]
}

styles.css

.some-element {some: style;}

Then the extension can be packaged/installed from Chrome's extensions page.


After doing the Chrome extension thing, I thought “oh yeah, it’s just a web server; I can stick an index.html file in there and it’ll just work”.

So, that’s my other answer. Create an index file, and write/style your page however you please.

Upvotes: 4

Related Questions