Welcome to

isMobile() && !$detect->isTablet()) { ?> #element01 { background: url(../images/nice-sm.jpg) no-repeat; #element02 { background: url(../images/nice-sm.jpg) no-repeat; #element03 { background: url(../images/nice-sm.jpg) no-repeat; */ } elseif ($detect->isTablet()) { ?> #element01 { background: url(../images/nice-md.jpg) no-repeat; #element02 { background: url(../images/nice-md.jpg) no-repeat; #element03 { background: url(../images/nice-md.jpg) no-repeat; */ } else { /* echo "This code is working on everything except a mobile or a tablet."; */ ?>