interview questions and answers

Web Technologies Interview Questions | CSS Interview Questions

Home interview questions Web Technologies interview questions CSS 
Friday, 10 February 2012
Main Menu
Home
Online Test
Contest
Search
FAQs
Contact Us
Login
Most Popular Category
JAVA

Microsoft Technologies
ASP, C#, DotNet, ...

Programming
C++, PHP, VB, ...

SAP

Testing

Web Technologies

Polls
Does personal networking help in job search?
 
IT Placement Papers interview questions Web Technologies interview questions CSS

This category contains CSS Interview Questions and Answers


How do I get rid of the gap under my image?

PDF Print E-mail

Images are inline elements, which means they are treated in the same way as text. Most people kind of know this - they know that if you use 'text-align:center' on an image it will be centred. What many people don't realise is that this means you will have a gap underneath an image. This gap is for the descenders of letters like j,q,p,y and g. To get rid of this gap you need to make the image block-level - like this : CSS img {display:block;} One problem that this can cause is when you want to have a few images next to each other - if they are block-level, they won't be next to each other. To get around that, you can use float:left. Of course, this might present another problem - maybe you don't want the image to float left. In this case, you can use an unordered list like this : CSS ul, li { list-style-type:none; padding:0; margin:0 auto; } ul { width:150px; } li { float:left; } HTML

  • wine
  • wine
  • wine
  • wine
  • wine
  • wine
  • wine
  • wine
  • wine




Be first to comment this article

Only registered users can write comments.
Please login or register.

 
< Prev   Next >

Web Technologies Interview Questions | CSS Interview Questions

Top!
Top!
Copyright © 2008 InterviewDuniya.com All Rights Reserved.
Partner Site: Maheshwari Matrimony