Results 1 to 6 of 6

Thread: What are the Dimension Properties in CSS?

  1. #1
    Join Date
    Aug 2006
    Posts
    287

    What are the Dimension Properties in CSS?

    I came to know that we can use the various dimensions of the objects in and around HTML elements by using the CSS. I have just started the CSS and I don't know much about the dimensions. Can anyone explain me what are the Dimension Properties in CSS.?? Also please provide me the proper description about the things that are related with the Dimension Properties. It will be much appreciable if you provide me some CSS code related with the same.!!
    Dimension 1100 (FMY032J) mini-tower
    2.53ghz Intel Pentium 4
    80 gig nfts HDD
    512 RAM
    Main circuit board: Dell 0CF458
    BIOS: Dell A00
    Display: Intel(R) 82865G Graphics Controller [Display adaptor]
    Multimedia: Sound MAX Integrated Digital Audio
    Windows XP Home SP2

  2. #2
    Join Date
    Nov 2008
    Posts
    996

    Re: What are the Dimension Properties in CSS?

    If you want to change the dimensions that means you will have to change the width ,height and defining of the space. The CSS Dimension Properties can be used to set various dimensions of the objects in and around HTML elements. The following are the various dimension properties :
    • Height
    • Line-height
    • Min-height
    • Max-height
    • Width
    • Min-width
    • Max-width

  3. #3
    Join Date
    Aug 2006
    Posts
    227

    Re: What are the Dimension Properties in CSS?

    I also don't have much knowledge about the CSS, but I know about the height of an element. The height of an element specified by the height property. The height takes the following values :
    • Length - This value defines the height in a relative units or absolute units like cm, mm, in, pt.
    • Auto - By using this property, the height is determined by the browser.
    • % - This defines the height in percentage of the height of the parent object.
    By default, value for height is auto.
    The negative lengths are not allowed.
    The following is the CSS code for the Height :
    Code:
    img {height : 350px ;}
    I do to dead flowers what people at morgues do to dead people. Suck all the moisture out, dip them in plastic, paint them up pretty and put them in a nice frame.

  4. #4
    Join Date
    Jul 2006
    Posts
    286

    Re: What are the Dimension Properties in CSS?

    If you want to set the distance between two adjacent lines, it can be set by using the Line-Height property. The baselines of the adjacent lines is the distance. This property can take the following values :
    number - This sets the line height of the current font-size to be multiplied by the number specified.
    normal - This property sets the line height to the default or inherited value based on the font size of the element.
    length - This sets a fixed distance between the lines. The units used are: em, px, cm, pt.
    % - This sets the line height in % of the element's font size.
    The following is the CSS code for the same :
    Code:
    p { line-height : 75 px;}
    IF you hate me, please don't mention it. I know who hates me and who doesn't. You really do not have to make fun of people....

  5. #5
    Join Date
    Jul 2006
    Posts
    442

    Re: What are the Dimension Properties in CSS?

    I have given you the CSS coding for increasing the space between lines :
    HTML Code:
    <html>
    <head>
    <style type="text/css">
    p.small {line-height: 0.3cm}
    p.big {line-height: 0.7cm}
    </style>
    </head>
    
    <body>
    <p>
    This is a stanza with a standard line-height.
    This is a stanza with a standard line-height.
    This is a stanza with a standard line-height.
    This is a stanza with a standard line-height.
    </p>
    
    <p class="small">
    This is a stanza with a smaller line-height.
    This is a stanza with a smaller line-height.
    This is a stanza with a smaller line-height.
    This is a stanza with a smaller line-height.
    </p>
    
    <p class="big">
    This is a stanza with a bigger line-height.
    This is a stanza with a bigger line-height.
    This is a stanza with a bigger line-height.
    This is a stanza with a bigger line-height.
    </p>
    
    </body>
    </html>
    "When they give you ruled paper, write the other way..." J.R.J.

  6. #6
    Join Date
    Nov 2008
    Posts
    1,192

    Re: What are the Dimension Properties in CSS?

    You can use the width property for setting the width of elements. The following example will describe it more clearly :
    HTML Code:
    <html> 
    <head> 
    <title>Setting the width of elements
    </title> 
    </head> 
    <body> 
    <table border="3"> 
    <tr>
    <td>Cell 1</td>
    <td>Cell 2</td>
    </tr> 
    <tr>
    <td>Cell 3</td>
    <td>Cell 4</td>
    </tr> 
    </table> 
    <table border="3" style="width: 250px;"> 
    <tr>
    <td>Cell 1</td>
    <td>Cell 2</td>
    </tr> 
    <tr>
    <td>Cell 3</td>
    <td>Cell 4</td>
    </tr> 
    </table> 
    </body> 
    </html>

Similar Threads

  1. How to use Properties object
    By Ash maker in forum Software Development
    Replies: 5
    Last Post: 10-02-2010, 05:49 AM
  2. Properties of .ini file
    By Logan 2 in forum Software Development
    Replies: 5
    Last Post: 25-01-2010, 01:43 PM
  3. Replies: 1
    Last Post: 16-12-2009, 01:11 PM
  4. Properties of nic
    By Triple-X in forum Networking & Security
    Replies: 5
    Last Post: 14-12-2009, 02:37 PM
  5. What is actually the meaning of properties for C#?
    By Joel5 in forum Software Development
    Replies: 3
    Last Post: 11-11-2009, 10:39 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,518,513.50072 seconds with 17 queries