?
Solved

library item won't insert in exact place I put it

Posted on 2008-02-09
15
Medium Priority
?
181 Views
Last Modified: 2010-08-05
Hi,

I created a library item which is strictly a set of conditional comments directed at IE.

I'm trying to insert the item into my <head> block, but when I do Dreamweaver  adds some code before and after the item.  So, before my library item I get:

</head>
</html>

and after the library item Dreamweaver adds:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>

I need these comments to be in the head section.

Why is Dreamweaver doing this and how do I fix it?

Thanks!
Gene
0
Comment
Question by:ugeb
  • 7
  • 5
  • 3
15 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 20858559
Hi ugeb,

Can you post the complete code of the lbi, please?  I suspect there is something in there that needs to be removed.
0
 
LVL 11

Author Comment

by:ugeb
ID: 20858608
Hi, this is the entire file so far.  I want to add stuff as the site expands.

Thanks!

<!-- the following IE insertion is to make the content move up enough so the bottom of the header isn't visible as a horizontal line and to help the footer line up-->
<!--[if IE]>
<style>
#wrapper {margin-top: -3px;}
#brand {
        margin-top: -20px;
}
</style>
<![endif]-->

Open in new window

0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 20858775
Hmm.  That looks harmless enough.  How about the code of the page you are trying to insert it into now?  I'll try to replicate the error on this end.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
LVL 11

Author Comment

by:ugeb
ID: 20859633
Hi, how much of the code do you need to see?  It's a whole web page, so if you like I can point you to the page online.  Would that help?

Thanks!
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 20859650
I would need to see the whole page just be sure.  I'd like to see the DW code, before the lbi is set...
0
 
LVL 11

Author Comment

by:ugeb
ID: 20859815
The page is here:

http://www.impactcollegeplanning.com

The index.html file is a good example.  It has this code hardwired in right after the line:
<link href="default.css" rel="stylesheet" type="text/css" />

Is this helpful or do I need to upload the page?

Thanks again!
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 20860499
Try removing this code from the page and then reinsert the lbi:

<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License
-->
0
 
LVL 11

Author Comment

by:ugeb
ID: 20871988
Whew, boy,

I tried your suggestion and a bunch of things, but Dreamweaver still wants to add that extra text.  Is Dreamweaver averse to putting things in the head block?
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 2000 total points
ID: 20872233
Hah.

I just tried to recreate the situation and DW CS3 popped an error message:

"Library items can only be inserted in the document body"

So there you go.  That explains the funkiness.  Can you switch to SSI or ASP/PHP includes instead?
0
 
LVL 19

Expert Comment

by:v2Media
ID: 20872342
Library items can only be used for objects between the <body> tags.

Quote: "You can create a library item from any element in the body section of a document, including text, tables, forms, Java applets, plugins, ActiveX elements, navigation bars, and images."
0
 
LVL 19

Expert Comment

by:v2Media
ID: 20872349
gah - didn't catch ur post jason, I knew this one from a previous Q'n; srry.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 20872495
Well, where were you two days ago?  

:)
0
 
LVL 19

Expert Comment

by:v2Media
ID: 20872743
Hey - some of us in commercial land get a bit busy!
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 20872751
Pfft.
0
 
LVL 11

Author Closing Comment

by:ugeb
ID: 31429511
Thanks for trying.  I'm just going to have to relent and change all my pages to .php.

thanks!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ready to get certified? Check out some courses that help you prepare for third-party exams.
Custom Android App Development is the need of an hour for several businesses. If you go through the right firm for Android Application Development, it can make a huge difference to the ways in which customers interact with your business.
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
Suggested Courses
Course of the Month3 days, 15 hours left to enroll

599 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question