• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 228
  • Last Modified:

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>
0
MFredin
Asked:
MFredin
  • 4
  • 3
2 Solutions
 
Ryan ChongCommented:
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>
0
 
Ryan ChongCommented:
>>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 ?
0
 
Jason C. LevineNo oneCommented:
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).
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Ryan ChongCommented:
i thought css using "class", while "id" is just to set an id for an object here?
0
 
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!
0
 
Jason C. LevineNo oneCommented:
MFredin,

Glad we could help.  Looks like ryancys had the right answer...
0
 
Ryan ChongCommented:
I got no problem if share credits with jason here, cheers.
0
 
Jason C. LevineNo oneCommented:
>>  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.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now