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

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
LVL 11
ugebAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jason C. LevineNo oneCommented:
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
ugebAuthor Commented:
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
Jason C. LevineNo oneCommented:
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
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

ugebAuthor Commented:
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
Jason C. LevineNo oneCommented:
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
ugebAuthor Commented:
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
Jason C. LevineNo oneCommented:
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
ugebAuthor Commented:
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
Jason C. LevineNo oneCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
v2MediaCommented:
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
v2MediaCommented:
gah - didn't catch ur post jason, I knew this one from a previous Q'n; srry.
0
Jason C. LevineNo oneCommented:
Well, where were you two days ago?  

:)
0
v2MediaCommented:
Hey - some of us in commercial land get a bit busy!
0
Jason C. LevineNo oneCommented:
Pfft.
0
ugebAuthor Commented:
Thanks for trying.  I'm just going to have to relent and change all my pages to .php.

thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Dreamweaver

From novice to tech pro — start learning today.