DW MX 2k4 - Design view does not work when I add a CSS & <div id=""> ?? How can I make this normal?

I am using Dreamweaver MX 2004 & Coldfusion MX.  When I add a CSS... (<link rel="stylesheet" type="text/css" href="../style.css"  />) to the head and also add (<div id="header">) the dreamweaver design view is all goofed up and I can't do anything with it.  What is going on here?  Here is all my code.

<!--- File name = "style.cfm"  -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="style.css"  />  </head>

<body>
<div id="header"><cfinclude template="Header.cfm"></div>
<div id="content">
<div id="navbar"><cfinclude template="Menu.cfm"></div>
<div id="main-text">HERE IS WHERE I PUT THE MAIN CONTENT OF THE PAGE.</div>
</div>
</body>
</html>
MFredinAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
I thought is "class" instead in this case?

try like:

<div class="header"><cfinclude template="Header.cfm"></div>
<div class="content">
<div class="navbar"><cfinclude template="Menu.cfm"></div>
<div class="main-text">HERE IS WHERE I PUT THE MAIN CONTENT OF THE PAGE.</div>
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
>>the dreamweaver design view is all goofed up and I can't do anything with it
hmm, make sure the css file is linked properly ?
Jason C. LevineDon't talk to me.Commented:
Hi MFredin,

Could you be a little more specific as to what "all goofed up" entails or please post the CSS file so we can recreate the problem ourselves?

From what you posted, the only odd thing I see is:

<link rel="stylesheet" type="text/css" href="style.css"  /> with the 4.01 Transitional doctype.  That tag looks like XHTML strict/transitional  because of the closing /> .

I'm not in front of DW at the moment, so I can't test this first, but try removing the / from the end and see if it snaps design view back to the way it should be.

Otherwise, the only other thing I can suggest is checking your site definitions to make sure all of the paths are set correctly.

ryancys,

You can use class or id the way MFredin has it.  ID's are meant to be used once so they are good for layout objects that aren't going to repeat throughout the page.  Class is used for objects that can repeat (<h>, <p>, <img>, etc).

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
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
i thought css using "class", while "id" is just to set an id for an object here?
MFredinAuthor Commented:
After going through all the code in all my included pages, I came across a CSS link in my header page to a different style file.  This is what was goofing everything up!  So the problem is solved.  I appreciate your help with this!
Jason C. LevineDon't talk to me.Commented:
MFredin,

Glad we could help.  Looks like ryancys had the right answer...
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
I got no problem if share credits with jason here, cheers.
Jason C. LevineDon't talk to me.Commented:
>>  I got no problem if share credits with jason here, cheers.

Thanks.

>>  i thought css using "class", while "id" is just to set an id for an object here?

CSS can apply to either.
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
Web Languages and Standards

From novice to tech pro — start learning today.