Hello everyone!
I gave it shot at trying and building my first survey page. it turned out really messy when I started coding my css. I was not able to select the elements properly . i guess they were getting inherited.
I would really like some advice on styling my page and formatting. Is their a abstract method or rule i should follow while styling my css?
Should i give each element a class name and style it ? what would be the most time saving one ?
Looks cool
but your body tag should be #body and not body
Hey nishanth,
good work so far!
My ideas:
- you can increase the readability of your code by 1. clicking on the small arrow on the right side of the code box and 2. clicking
Format HTML/CSS
- you can get a code validation here by pasting your HTML code into the
body
- the placeholder text is very hard to read for me, because it is very dark
- I think the two “questions” at the bottom would benefit from moving the “questions” (
How did you get to know about us:
andServices Required:
) into some kind of heading
Nowadays it’s best practice to mostly use classes
for everything. This increases the maintainability of your project, because you won’t get problems with CSS Specificity.
Keep us posted!
Thank you so much for your valuable advice and suggestion. I will look into those things. Also I had a question about how to format my css so that the website is compatible with Mobile too. Is it done using @keframes?
When i turn it into #body everything backgroung image and gradient gets messed up
If you are talking about responsive layouts, you can use Media queries and define constraints for your html elements.
Oh alright! I guess I have to look into that in depth. Thank you!
About the layout: This is a bold try, definitely.
For aligning elements, you can combine similar ones in a class and put some margins and paddings to align them properly.
And for questions, you can use h3 tags, or use P tags.
Like it has been said above, for a couple questions, there needs to be a clear segregation between the question and the choices.
Keep it up, and you’ll surely skill up with time . Cheers
Thanks a lot. I will look into it and make the changes according to your suggestions.You have been very helpful.