Link to home
Start Free TrialLog in
Avatar of ugeb
ugebFlag for United States of America

asked on

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
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Hi ugeb,

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

ASKER

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

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.
Avatar of ugeb

ASKER

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!
I would need to see the whole page just be sure.  I'd like to see the DW code, before the lbi is set...
Avatar of ugeb

ASKER

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!
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
-->
Avatar of ugeb

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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."
gah - didn't catch ur post jason, I knew this one from a previous Q'n; srry.
Well, where were you two days ago?  

:)
Hey - some of us in commercial land get a bit busy!
Avatar of ugeb

ASKER

Thanks for trying.  I'm just going to have to relent and change all my pages to .php.

thanks!