simple css question
-
I am having a css issue.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="https://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>test</title> <style> ul { background-color:red; } ul li { float:left; width:50%; } </style> </head> <body> <ul> <li>Category 1</li> <li>Category 2</li> <li>Category 3</li> <li>Category 4</li> </ul> </body> </html>
Question: why isn’t the ‘ul’ background red? What is the proper way to write this simple css so the ‘ul’ is both red, and the ‘li’ elements are floating left @ 50%? I am having a complete brain fart why this isn’t working and how this should be structured.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘simple css question’ is closed to new replies.