I'd still recommend staying in Barcelona itself. It's got an excellent, cheap and fully-integrated transport system so getting to beaches, bars, etc, simply isn't a problem. (Barcelona has some great beaches. You don't need to travel out to the Costas).
There are decent, well-located hotels at around £20 per night on
http://www.hostelworld.com
NB: Don't be put off by the word 'hostel' in that URL. You can use the search facility to de-select 'hostels' but still search for 'hotels' and 'B&Bs' if you so wish. Further don't be put off if you see the word 'Hostal' in a property description. Spaniards use it almost synonymously with 'Pension', to mean a small private hotel. (I found a delightful 'Hostal' in Madrid last year, using that website, in a prime location, for just €22 per night)
In particular, consider Hostal Nilo which charges £21.14 pppn single or £19.87 pppn double or twin. Eixample Passeig Gracia 1 is another possibility (£21.14pppn single, £16.91 [or £19.02 at weekends] pppn double). And there are LOTS more!