|
INTERVIEW QUESTIONS
WEB
CSS
DETAILS
Question: Why are there gaps above and below my form in IE?
Answer: A lot of the time, when you find gaps that you can't account for, they are due the default styles of different browsers - especially the margins and padding. IE gives forms some margins above and below forms while Firefox doesn't. It's like with lists - you'll find bigger padding and margins for lists in IE than in Firefox. Paragraph margins are different, as are the margins on heading tags (h1,h2, etc).
A good way to not get caught out by these problems is to set all margins and padding to zero at the top of your style sheet and then add them as and when you feel the a need for them, in that way, any margins and padding will be the same in different browsers.
CSS * { margin:0; padding:0; }
|
|
|
Category |
CSS Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 9375 users |
Added on |
9/4/2014 |
Views |
68612 |
Rate it! |
|
|
Question:
Why are there gaps above and below my form in IE?
Answer:
A lot of the time, when you find gaps that you can't account for, they are due the default styles of different browsers - especially the margins and padding. IE gives forms some margins above and below forms while Firefox doesn't. It's like with lists - you'll find bigger padding and margins for lists in IE than in Firefox. Paragraph margins are different, as are the margins on heading tags (h1,h2, etc).
A good way to not get caught out by these problems is to set all margins and padding to zero at the top of your style sheet and then add them as and when you feel the a need for them, in that way, any margins and padding will be the same in different browsers.
CSS * { margin:0; padding:0; } Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
How does a simple CSS style rule look ?
|
View Answer
|
|
How does a simple CSS style rule look ?
|
View Answer
|
|
How do I move the list bullet to the left/right?
|
View Answer
|
|
I want my page fonts to look the same everywhere as in… a) Why are my font sizes different in different browsers ? b) Why are my font sizes different on different platforms ?
|
View Answer
|
|
Can you use someone else's Style Sheet without permission?
|
View Answer
|
|
How do I place two paragraphs next to each other?
|
View Answer
|
|
I made a 10px-high div, but IE makes it 20px high...
|
View Answer
|
|
To what are partial URLs relative?
|
View Answer
|
|
Do URL's have quotes or not?
|
View Answer
|
|
Why can @import be at the top only?
|
View Answer
|
|
Justified Text?
|
View Answer
|
|
Do any WYSIWYG editors support the creation of Style Sheets? Any text-based HTML editors?
|
View Answer
|
|
Must I quote property values?
|
View Answer
|
|
How do I centre my page?
|
View Answer
|
|
What is the percentage value in 'font-size' relative to?
|
View Answer
|
|
Can I attach more than one declaration to a selector?
|
View Answer
|
|
How To Style Forms?
|
View Answer
|
|
How To Style Table Cells?
|
View Answer
|
|
How far can CSS be taken beyond the web page--that is, have generalized or non-web specific features for such things as page formatting or type setting?
|
View Answer
|
|
How frustrating is it to write a specification knowing that you're at the browser vendors' mercy?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All CSS Interview Questions & Answers - Exam Mode /
Learning Mode
|