HTML Help
HTML Help Central . com

» Online Users: 96

0 members and 96 guests
No Members online
Most users ever online was 695, 02-16-2011 at 07:01 AM.

» Site Navigation

 > FAQ

» Domains For Sale

Results 1 to 4 of 4

Thread: <dl> issue

  1. #1
    Join Date
    Feb 2013
    Posts
    2

    <dl> issue

    Hey guys, looking for some help on a piece of code I'm screwing up. Just started my first programming class a month ago.
    The part is below, for some reason the <dd> lines are being indented on the finished page instead of hanging on the left margin like normal. Any help is appreciate, thanks!


    The code:

    <dl>
    <dt><strong>What is a yurt?</strong></dt>
    <dd>Our luxury yurts are permanent structures four feet off the ground. Each yurt has canvas walls, a wooden floor, and a roof dome that can be opened.</dd>
    <dt><strong>How are the yurts furnished?</strong></dt>
    <dd>Each yurt is furnished with a queen size bed with down quilt and gas-fired stove. The luxury camping experience also includes electricity and a sink with hot and cold running water. Shower and restroom facilities are located in the lodge.</dd>
    <dt><strong>What should I bring?</strong></dt>
    <dd>Bring a sense of adventure and some time to relax! Most guests also pack comfortable walking shoes and plan to pack for changing weather with layers of clothing.</dd>
    </dl>

    This is what it's doing on the finished, the indent is just there because when I first posted this, it lined up everything to the margin on here =P

    What is a yurt?
    indentOur luxury yurts are permanent structures four feet off the ground. Each yurt has canvas walls, a wooden floor, and a roof dome that can be opened.
    How are the yurts furnished?
    indentEach yurt is furnished with a queen size bed with down quilt and gas-fired stove. The luxury camping experience also includes electricity and a sink with hot and cold running water. Shower and
    indentrestroom facilities are located in the lodge.
    What should I bring?
    indentBring a sense of adventure and some time to relax! Most guests also pack comfortable walking shoes and plan to pack for changing weather with layers of clothing.

  2. #2
    Join Date
    Sep 2007
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    313
    Hi there JWalden26,

    and a warm welcome to these forums.

    ...for some reason the <dd> lines are being indented on the finished page instead of hanging on the left margin like normal...
    That is the correct behaviour.

    By default he "dd element" has a "margin-left:40px" setting.

    If not required use this code...
    Code:
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="language" content="english"> 
    <meta http-equiv="Content-Style-Type" content="text/css">
    
    <title>remove dd default margin</title>
    
    <style type="text/css">
    dt {
        font-weight:bold;
     }
    dd {
        margin-left:0;
     }
    </style>
    
    </head>
    <body>
    
    <dl>
    
    <dt>What is a yurt?</dt>
    
    <dd>
    Our luxury yurts are permanent structures four feet off the ground. Each yurt 
    has canvas walls, a wooden floor, and a roof dome that can be opened.
    </dd>
    
    <dt>How are the yurts furnished?</dt>
    
    <dd>
    Each yurt is furnished with a queen size bed with down quilt and gas-fired stove. 
    The luxury camping experience also includes electricity and a sink with hot and 
    cold running water. Shower and restroom facilities are located in the lodge.
    </dd>
    
    <dt>What should I bring?</dt>
    
    <dd>
    Bring a sense of adventure and some time to relax! Most guests also pack comfortable 
    walking shoes and plan to pack for changing weather with layers of clothing.
    </dd>
    </dl>
    
    </body>
    </html>
    coothead

  3. #3
    Join Date
    Feb 2013
    Posts
    2
    Thanks coot, I got a hold of my teacher today and he said the example was incorrect.

  4. #4
    Join Date
    Sep 2007
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    313
    Hi there JWalden26,

    ...I got a hold of my teacher today and he said the example was incorrect...
    Whose example was incorrect, and in what way?

    coothead

Similar Threads

  1. Layout issue
    By X-Rayz in forum HTML / XHTML / XML
    Replies: 1
    Last Post: 10-21-2007, 10:20 PM
  2. I've got an HTML issue.
    By mdshort in forum HTML / XHTML / XML
    Replies: 5
    Last Post: 06-21-2004, 06:03 PM
  3. Another Table Issue
    By WindWalker in forum HTML / XHTML / XML
    Replies: 2
    Last Post: 06-02-2004, 09:06 AM
  4. Browser Issue
    By DawnHenderson in forum Javascript / AJAX / VBScript
    Replies: 1
    Last Post: 03-30-2004, 01:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBadvanced CMPS v4.1.1