Each of my pages has http headers in which the language code (two chars) is given by some magical variable that some how returns the current set language $_SESSION['language'
header('Content-language: ' . $_SESSION['language']);
// outputs HTTP Headers "en" or "ar" (ar = arabic spoken in Dubai etc) etcettera
Now, I would like to set the alignment of my p selector to right, as opposed to left, via css property text-alignment: right whenever either HTTP headers say language is ar or fa
How could I make an if statement in my (thankfully already php-ised all.css file?
sothat I can append this into the top or bottom of the rest of the css files included into the all.css? I hav a feeling it should look something like this (please don’t laugh!) Thanks very much for your suggestions!
/*
| overrule the alignment of html/body/p text when $_SESSION['language' = ar/fa
*/
if $_SESSION['language'] <<==>> "ar" OR "fa"
then add rule to css: "text-alignment: right !important"
1 Answer