-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
This mindblowing project lets you run Windows XP on the web
By Usama Jawad96,
- microsoft
- windows xp
- (and 4 more)
- 12 replies
- 0 views
-
HTML, CSS, & JavaScript All-in-One For Dummies (worth $39.99) free download ends today
By News Staff,
- ebook offer
- sponsored
- (and 3 more)
- 0 replies
- 0 views
-
Download HTML, CSS, & JavaScript All-in-One For Dummies ($39.99 Value, now FREE)
By News Staff,
- ebook offer
- sponsored
- (and 5 more)
- 0 replies
- 0 views
-
WordPress-Theme Twenty Twenty Four-customizing: how to do that - a Gutenberg special question...
By thedhubs,
- 1 answer
- 1,762 views
-
How Google killed my excitement in operating system upgrades
By zikalify,
- operating systems
- (and 7 more)
- 18 replies
- 0 views
-
Question
Mohammad_Khalid_Hussain
Hi there guys,
I wanted to create a simple page interface as an offline quiz interface for an event. What I want is for the choices to appear side by side and not one after another like in a list, so overall, it would resemble the Windows logo. Attached are the codes I've typed so far:
HTML:
<!DOCTYPE html> <html> <!--This was created by Khalid Hussain--> <head> <title>Quiz System</title> <link rel="stylesheet" href="css/design.css"/>;/head> <body> <h1>Heroes: Grand Quiz</h1> <h2>Question</h2> <div id="question"> A really really long and tough question goes here ? </div> <div id="choices"> <div id="choice1"> Option 1 </div> <div id="choice2"> Option 2 </div> <div id="choice3"> Option 3 </div> <div id="choice4"> Option 4 </div> </div> </body> </html>
CSS:
/*@ import 'reset.css';*/ /*Khalid Hussain's first ever CSS written from scratch for an actual website.*/ /*This is probably not the best CSS you'll ever see.*/ h1 { font-size: 35px; margin-bottom: 0px; } h2 { font-size: 30px; margin-top: 0px; margin-bottom: 0px; } body { width: 700px; margin: auto; text-align: center; font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif"; color: white; background-color: black; } body #question { font-size: 20px; padding: 20px; margin-top: 0px; } body #choices { color: white; width: 700px; margin: auto; } body #choice1 { margin-left: 0px; width: 250px; padding: 20px 20px; background: blue; margin-bottom: 15px; border-radius: 20px; } body #choice2 { width: 250px; padding: 20px 20px; background: red; margin-bottom: 15px; border-radius: 20px; } body #choice3 { width: 250px; padding: 20px 20px; background: blue; margin-bottom: 15px; border-radius: 20px; } body #choice4 { width: 250px; padding: 20px 20px; background: blue; border-radius: 20px; }
Any help or positive criticism is highly appreciated. Thanks.
Link to comment
https://www.neowin.net/forum/topic/1087853-need-help-with-some-css-alignment/Share on other sites
6 answers to this question
Recommended Posts