Dealing with absolute paths while on localhost
You should just set the $base_url in your settings file while you're working on localhost, then you can just change it when you put the site live.

The settings file is at "sites/default/settings.php" and you should add:

$base_url = 'http://localhost:8888/mylocalproject';


Obviously when the site goes live you want to change/remove that line to match your new environment.