Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4
This is the forum to discuss the Wrox book Beginning Dreamweaver MX by Charles E. Brown, Imar Spaanjaars, Todd Marks; ISBN: 9780764544040
Please indicate which version of the book you are using when posting questions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old June 22nd, 2005, 04:54 AM
Authorized User
 
Join Date: Apr 2005
Location: London, , United Kingdom.
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar

Good to read what you recommend and I will go as you direct. One thing. Do you use Dreamweaver to delevop your sites?

Jacky

  #12 (permalink)  
Old June 22nd, 2005, 06:27 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Yes, I do, for ASP and static sites.

Lately we do a lot of ASP.NET development. Dreamweaver just isn't the right tool for complex .NET programming, so for that we use Visual Studio .NET. However, I still use Dreamweaver a lot for the initial designs, and layout tweaking after we built the rough outlines in VS.NET. (VS.NET has a very very crappy HTML designer creating horrible code; fortunately that's going to change with the 2005 release).

Cheers,

Imar
  #13 (permalink)  
Old June 22nd, 2005, 08:57 AM
Authorized User
 
Join Date: Apr 2005
Location: London, , United Kingdom.
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar

I just spoke to a mate of mine who has given me some web space and he does exactly the same as you.

Take cAKE

All the Best Jacky

  #14 (permalink)  
Old June 22nd, 2005, 01:02 PM
Authorized User
 
Join Date: Apr 2005
Location: London, , United Kingdom.
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar

VS.Net is an MS product and only work with ASP. Am I correct?
What do programmers use or is it by hand or css or something.

Jacky

PS sorry about the teke cake above.

All the best

  #15 (permalink)  
Old June 22nd, 2005, 01:09 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Darn, I just grabbed the whole cake because I thought it was mine... ;)

Yes, VS.NET is a Microsoft product. It works only with ASP.NET, the successor to ASP. You *could* use it for ASP as well, although it's not optimal for that task.

What do you mean with:
Quote:
quote:What do programmers use or is it by hand or css or something.
Use for what? For other programming languages than ASP.NET?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
  #16 (permalink)  
Old June 24th, 2005, 02:51 AM
Authorized User
 
Join Date: Apr 2005
Location: London, , United Kingdom.
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar

I assume you mean me to continue here.

Firstly please see www.renovations.co.uk and you will see the crude layout that I have done for this project. More links need to be in place. Let’s call this Example 1.

Below is a copy of the above done in the style mine should have been. Let’s call this Example 2 which I have accessed by opening the html file sent as an attachment and copying the source code.

Pop style into a file on your machine and you will see that it looks almost the same.

I took style 2 code, opened a file in DW and dropped it in. The resulting look was not as above.

My objective is to be able to work on the above project with my colleagues who currently have a copy of all the code on their individual machines and I make designs and directions which they implement.

We have been working on this program for a couple of years and I can no longer see any light at the tunnel. I can give you more background and where I want to go if you’re interested.

Code for Example 2 followed by Styles for Example 2



Code

<HTML>
<HEAD>
<TITLE>MRNS Design V2</TITLE>
<link href="./mainStyle.css" rel="stylesheet" type="text/css">
<script language=Javascript src="./main.js"></script>
</HEAD>
<BODY>
<DIV id="mainTop">
<img id="mainImg" src="./images/logo.png" width="241" height="73" border="0">
<DIV id="mainLinks">
    <DIV id="linkitem">
        <A HREF="logon.html">Customer Log on</A>
    </DIV>
    <DIV id="linkitem">
        <A HREF="logon.html">Your Account</A>
    </DIV>
    <DIV id="linkitem">Logged on as: </DIV>
</DIV>
</DIV>
<DIV id="menuBar">
    <DIV id="menuItemNarrow">&nbsp;</DIV>
    <DIV id="menuItem"><A HREF="javascript:hideIt();">Home</A></DIV>
    <DIV id="menuItem"><A HREF="javascript:hideIt();">About us</A></DIV>
    <DIV id="menuItemWide"><A HREF="javascript:showIt();">Project Selector</A></DIV>
    <DIV id="menuItem"><A HREF="javascript:hideIt();">Recruitment</A></DIV>
    <DIV id="menuItemWide"><A HREF="javascript:hideIt();">Management Reports</A></DIV>
    <DIV id="menuItem"><A HREF="javascript:hideIt();">Controller</A></DIV>
    <DIV id="menuItem"><A HREF="javascript:hideIt();">Contact us</A></DIV>
    <DIV id="menuItemNarrow"><A HREF="javascript:hideIt();">Help</A></DIV>
    <DIV id="menuItem">&nbsp;</DIV>
</DIV>
<DIV id="secondLevel">
    <DIV id="secondLevelSpacer">
        <DIV id="menuSpacerNarrow">&nbsp;</DIV>
        <DIV id="menuSpacer">&nbsp;</DIV>
        <DIV id="menuSpacer">&nbsp;</DIV>
        <DIV id="menuSpacerSel">&nbsp;</DIV>
        <DIV id="menuSpacer">&nbsp;</DIV>
        <DIV id="menuSpacerWide">&nbsp;</DIV>
        <DIV id="menuSpacer">&nbsp;</DIV>
        <DIV id="menuSpacer">&nbsp;</DIV>
        <DIV id="menuSpacerNarrow">&nbsp;</DIV>
        <DIV id="menuSpacer">&nbsp;</DIV>
    </DIV>
    <DIV id="menuBar2nd">
        <DIV id="menuItemWide"><A HREF="javascript:hideIt();">Project Selection</A></DIV>
        <DIV id="menuItemWide"><A HREF="javascript:hideIt();">Location Criteria</A></DIV>
        <DIV id="menuItemWide"><A HREF="javascript:showIt();">Custom Data</A></DIV>
        <DIV id="menuItemWide"><A HREF="javascript:hideIt();">Selection Groups</A></DIV>
        <DIV id="menuItemWider"><A HREF="javascript:hideIt();">Control Screen Builder</A></DIV>
        <DIV id="menuItemWider"><A HREF="javascript:hideIt();">Report Screen Builder</A></DIV>
    </DIV>
</DIV>
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><H1>Pa ge detail goes in here.</H1><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<DIV id="mainBottom">
    <DIV id="menuBar" style="vertical-align: baseline;">
        <DIV id="menuItemWide">&copy; All rights Reserved 2005</DIV>
        <DIV id="menuItemWide">&nbsp;</DIV>
        <DIV id="menuItem"><A HREF="aboutUs.html">About us</A></DIV>
        <DIV id="menuItem"><A HREF="sales.html">Sales</A></DIV>
        <DIV id="menuItemNarrow"><A HREF="help.html">Help</A></DIV>
        <DIV id="menuItem"><A HREF="contactUs.html">Contact us</A></DIV>
    </DIV>
</DIV>
</BODY>
</HTML>

Styles for Example 2

<!--

    body {
    font-family: Trebuchet MS, Verdana, Arial, Helvetica, sans-serif;
    font-size: x-small;
    font-weight:normal;
    color: #000000;
    background: #ffffff;
    padding:0px;
    margin-top:0px;
    margin-left:0px;
    margin-right:0px;
    font-family: Arial, Helvetica, sans-serif;
    }

#mainTop {
    background: #B7E8FF none repeat scroll 0%;
    width:100%;
    margin:0%;
    padding:0%;
    padding-top:2px;
    border:0%;
    height:73px;
  }
#mainImg {
    padding-left: 20px;
    position: absolute;
  }
#mainLinks {
    text-align:right;
    font:black;
    width: 20%;
    float:right;
    height:73px;
    padding-right:10%;
    padding-top:0px;
  }
#linkitem {
    text-align:center;
    height:24px;
    vertical-align:text-top;
    padding-top:0px;
    margin-top:0px;
  }
a:link {
    font-family: Arial, Helvetica, sans-serif;
    font-size: x-small;
    text-transform: none;
    color: #000000;
    text-decoration: underline;
    background-repeat: no-repeat;
    background-position: center 25px;
    text-align: center;
}
a:visited {
    font-family: Arial, Helvetica, sans-serif;
    font-size: x-small;
    color: #000000;
}
a:hover {
    font-family: Arial, Helvetica, sans-serif;
    font-size: small;
    color: #FF0000;
}

a:active {
    font-family: Arial, Helvetica, sans-serif;
    font-size: small;
    color: #0000FF;
    font-weight: bold;
}
#menuBar {
    background: #C1CBD7 none repeat scroll 0%;
    width:100%;
    margin:0%;
    padding:0%;
    padding-top:2px;
    border:0%;
    height:25px;
    text-align:center;
  }
#menuItem {
    float:left;
    width:10%;
    padding-top:0%;
    padding-bottom:0%;
    margin-top:0%;
    margin-bottom:0%;
  }
#menuItemWide {
    float:left;
    width:15%;
  }
#menuItemWider {
    float:left;
    width:19%;
  }
#menuItemNarrow {
    float:left;
    width:5%;
  }
#mainBottom {
    background: #C1CBD7 none repeat scroll 0%;
    width:100%;
    margin:0%;
    padding:0%;
    padding-top:30px;
    height:20px;
    vertical-align:baseline;
  }
H1 {text-align:center;}
#secondLevel {
    visibility:hidden;
    background: #B7E8FF none repeat scroll 0%;
    width:100%;
    margin:0 0 0 0;
    padding:0 0 0 0;
    padding-top:0%;
    padding-bottom:0%;
    margin-top:0%;
    margin-bottom:0%;
    border:0%;
    height:30px;
    text-align:center;
    float:left;
  }
#menuSpacerSel {
    background:#C1CBD7;
    height:5px;
    float:left;
    width:15%;
    margin:0 0 0 0;
    padding:0 0 0 0;
    padding-top:0%;
    padding-bottom:0%;
    margin-top:0%;
    margin-bottom:0%;
  }
#menuSpacer {
    background:#B7E8FF;
    height:5px;
    float:left;
    width:10%;
    margin:0 0 0 0;
    padding:0 0 0 0;
    padding-top:0%;
    padding-bottom:0%;
    margin-top:0%;
    margin-bottom:0%;
  }
#menuSpacerWide {
    background:#B7E8FF;
    height:5px;
    float:left;
    width:15%;
    margin:0 0 0 0;
    padding:0 0 0 0;
    padding-top:0%;
    padding-bottom:0%;
    margin-top:0%;
    margin-bottom:0%;
  }
#menuSpacerNarrow {
    background:#B7E8FF;
    height:5px;
    float:left;
    width:5%;
    margin:0 0 0 0;
    padding:0 0 0 0;
    padding-top:0%;
    padding-bottom:0%;
    margin-top:0%;
    margin-bottom:0%;
  }
#menuBar2nd {
    background: #C1CBD7;
    width:94%;
    margin:0%;
    padding:0%;
    padding-top:0%;
    padding-left:0%;
    margin-left:3%;
    padding-bottom:0%;
    margin-top:0%;
    margin-bottom:0%;
    border:0%;
    height:25px;
    text-align:center;
  }
#secondLevelSpacer {
    height:5px;
    margin:0 0 0 0;
    padding:0 0 0 0;
    padding-top:0%;
    padding-bottom:0%;
    margin-top:0%;
    margin-bottom:0%;
  }
-->




  #17 (permalink)  
Old June 24th, 2005, 04:49 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Boy, where do I start.....

I am not surprised Dreamweaver isn't able to display your site exactly as the browser does.
First of all, that may be part due to your "developing for IE only".
Secondly, don't expect Dreamweaver to render exactly as a browser. Just as there is a difference between FireFox, IE, Opera and Netscape, there is also a difference in how DW renders. I tries to render very close to IE, even emulating its standards compliant doctype mode, but it's not perfect.

I am also not very clear on what you're asking me Are you asking why Dreamweaver cannot render this page? Are you asking for help?

That said, you are making it very hard for Dreamweaver. The page you posted contains a least a dozen HTML and CSS violations, contains a lot of unnecessary code and just plain wrong code. I wish I had the time to redo it for you but unfortunately I don't. Besides, I should be outside in the garden drinking wine instead of sweating all over the place in this hot office of mine.

Anyway, I'll try to summarize the largest mistakes:

1. Add a doctype. Learn here why doctypes are cool, useful, make web development a lot easier, how they make your page work cross browser (possibly even in Dreamweaver) and learn how to teach doc types to make coffee for you: http://www.alistapart.com/articles/doctype/

2. Drop the old skool HTML and use XHTML instead. Those ugly upper case tags are so passé ;) Use lower case tags, and self closing tags instead.
Look here, here, here or basically at any page in Google that has the words XHTML, rules and Benefits.

3. IDs in a page *must* be unique. IE lets you get away with that and still gives you a reference to an element with a duplicate Id; other browsers won't. So this doesn't make sense:

<DIV id="menuItem"><A HREF="javascript:hideIt();">Home</A></DIV>
<DIV id="menuItem"><A HREF="javascript:hideIt();">About us</A></DIV>

If you want to apply multiple style rules to a single element, apply a class, not an ID:

<div class="menuItem"><a href="javascript:hideIt();">Home</a></div>
<div class="menuItem"><a href="javascript:hideIt();">About us</a></div>

Then don't use the # in your CSS selector but a . instead:

.menuItem
{
color: blue;
}

4. Properties with a value of 0 should be set to 0 and nothing else. 0 means 0%, 0pt, 0horses, 0em, 0px 0cm, 0browsers, 0cssdevelopers etc etc all at the same time. To simplify specifying that, simply use 0:

margin: 0;

sets the margin for all four directions to 0.

5. Don't apply the font-family property on every selector; apply it to a top element, like body and then let the cascade do its work. Child elements will inherit their parent's settings. This rule doesn't apply to just the font-family but to any other property that can inherit a value from its parent.

6. You're using loads of <div> tags which are, in the current implementation, about as bad as tables. If you want to use them for layout like this, you better switch to tables as they'll be easier to manage....
Instead of nested <div>s, the menu could be a simple[list] with a bunch of <li> items with some CSS applied. This is something for lower down on the todo list though.

If you don't understand all of what I am suggesting here, take a look at the left of this page; it's likely you'll see an add for Beginning CSS: Cascading Style Sheets for Web Design. Go get yourself a copy of it. It's worth every penny, interesting to read and opens a wonderful world of CSS for you allowing you to create fancy looking, cheaper to build and better to maintain web sites. Believe me....

OK, off to the garden now...

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: 07 - Six Shooters by Queens of the Stone Age (Track 7 from the album: Songs For The Deaf) What's This?
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Module.InsertText affecting unrelated variables! DaDeViL Access VBA 1 October 16th, 2005 12:43 AM
Counting node-set children in template rufustfirefly XSLT 2 May 3rd, 2004 08:48 AM
How to remove rowguid without affecting ids bful SQL Server 2000 2 November 28th, 2003 12:57 PM



All times are GMT -4. The time now is 02:34 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.