I don’t know of any way that css could block your database. PHP, Mysql and css only output parsed html for your browser. Therefore, php accessing the database would be done, before the data is parsed to the browser, where the css parses the data to format it. It may be possible you are using incorrect html or css code giving the wrong result.
Perhaps, you could post a partial of the css code and a partial of html.
Check your php code for errors in the print statements for example forgeting to use the \ before a double quote. That should generate an error, unless you disable the error messages.
Without seeing anything, it is all guesses.