0 members and 54 guests
No Members online
Most users ever online was 695, 02-16-2011 at 07:01 AM.
» Site Navigation
» Domains For Sale
|
-
<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.
-
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
-
Thanks coot, I got a hold of my teacher today and he said the example was incorrect.
-
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
-
Yes, I agree with above post, w3school is one of best option.
Similar Threads
-
By rmvgaines in forum CSS
Replies: 2
Last Post: 10-22-2007, 07:39 PM
-
By X-Rayz in forum HTML / XHTML / XML
Replies: 1
Last Post: 10-21-2007, 10:20 PM
-
By mdshort in forum HTML / XHTML / XML
Replies: 5
Last Post: 06-21-2004, 06:03 PM
-
By WindWalker in forum HTML / XHTML / XML
Replies: 2
Last Post: 06-02-2004, 09:06 AM
-
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
-
Forum Rules
|