20 replies [Last post]
n00ge
Offline
Regular
Last seen: 16 years 7 weeks ago
Timezone: GMT-5
Joined: 2004-01-02
Posts: 32
Points: 0

I'm working on a project and am having a tough time getting a webpage to render correctly in Dreamweaver MX. I am forced to use this version because of the client we are working with. It's a XHTML+CSS site and renders fine in IE, Opera, Firefox, and Safari, but looks like crap in Dreamweaver MX. I have templates set up for the client to edit the pages, but because of the way it renders, it is tough for them to do any edits. Is there a way, either through html, CSS, or some sort of special commenting to hide certain areas from the display in Dreamweaver MX? This is really important as I'm nearing the end of the project and need to show the client how to manage the site.

Articles and personal work
http://www.creativeruin.com

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 38 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

HTML or CSS Hacks for Dreamweaver MX

You really ought to be asking this on a forum which deals with that god awful piece of software, sorry; it doesn't find much favour here amongst primarily skilled hand coders. if it can't handle straightforward code then it really is worthless, and the thought of clients using it to make believe they know something about coding/developing/updating sites makes me shudder and is one of the chief reasons I loath the Weaver of Lies.

Sorry I realise you weren't looking for a rant but this is a coding forum rather than software specific one and not many here will have detailed knowledge of DW.

Your client would be better of with a CMS rather than DW, they can probably do less damage then.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

n00ge
Offline
Regular
Last seen: 16 years 7 weeks ago
Timezone: GMT-5
Joined: 2004-01-02
Posts: 32
Points: 0

HTML or CSS Hacks for Dreamweaver MX

Haha, I know Hugo... I'm not a fan of dealing with this either. The client is a college and they are restricting us to simple html and we have to use Dreamweaver for editing. I was just hoping people out there other than myself have ran into this issue. Sadly enough, the Dreamweaver people are probably NOT the best people to go to because of their lack of knowledge about web standards and efficient coding. I did post there as well hoping for some help though. If anybody has any ideas, please let me know. Thanks.

Articles and personal work
http://www.creativeruin.com

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 1 year 32 weeks ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

HTML or CSS Hacks for Dreamweaver MX

Hugo wrote:
You really ought to be asking this on a forum which deals with that god awful piece of software, sorry; it doesn't find much favour here amongst primarily skilled hand coders. if it can't handle straightforward code then it really is worthless


I share your general disdain of WYSIWYG editors for the web, but on the other hand I find Dreamweaver MX quite handy as an editor for hand coding! Also, when I have to put a large hunk of text in a document I admit I use the design view to paste it in. The resulting code needs a bit of cleanup of course, but surpisingly little all things considered. Just don't let it convert your html files created by Word!

Well, the resulting code is better than Word html, but still a horor show. Unfortunately where I work I often have to convert Word documents to html. So my procedure is to print the file first to get an idea of the intended format, then save the Word document as text, then create an xhtml page and paste the text document into the body in Design view, then back to code view to clean up the document.

It saves a lot of work and creates decent code after I've cleaned it up a bit.

But to design and create a web page in DW's design view? Horrors!

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

ragamuffin
ragamuffin's picture
Offline
Leader
Iowa
Last seen: 13 years 28 weeks ago
Iowa
Joined: 2005-06-02
Posts: 691
Points: 0

HTML or CSS Hacks for Dreamweaver MX

Hugo wrote:
Your client would be better of with a CMS rather than DW, they can probably do less damage then

I agree completely...this is what's going to happen: You prepare site, client updates site with DW, client messes up site, client yells at you because site is messed up, stressed relationship builds between you and client.

My suggestion...as a developer and designer, you should present that facts to them about the DW issues and then present them to them a much, much better alternative using a CMS...which there are good and expensive ones out there. If interested, I have a recommendation. With the CMS, you control the development side and the client can do their thing without messing up the code and so forth.

If they don't listen, then you can say you tried.

- r

n00ge
Offline
Regular
Last seen: 16 years 7 weeks ago
Timezone: GMT-5
Joined: 2004-01-02
Posts: 32
Points: 0

HTML or CSS Hacks for Dreamweaver MX

And we did try. The company I works for has a CMS that the client does like. BUT, they won't use it. It's a college and they have their restrictions. They are only allowed to be on their own servers and their vendors are not allowed to use any dynamic code. Only HTML, CSS, Javascript, and Flash.

Articles and personal work
http://www.creativeruin.com

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 38 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

HTML or CSS Hacks for Dreamweaver MX

I realise your dilemma n00ge only wish I could help, but this is the oft mentioned problem with DW it's design view thingy is just hopeless, but your mention of a specific way of hiding code from DW was what made me think that it could be best answered by an experienced DW forum as you would have thought they would understand the nature of the specific problem, silly me :roll:

Ed I realise that many do use the functionality of DW code view as a basic editor and can achieve what you do but that is through detailed knowledge of how it mangles code and what constitutes correct standards code, problem with DW is that it lures newbies into a trap where they think that coding building web pages is governed and only possible when using software such as DW, that is insidious and abhorrent, also to use DW purely as a text editor just seems daft when you consider just how expensive it is, in the UK it used to be around £600; what planet are they on how on earth do they justify that much, I use HTML-Kit occasionally which is every bit as featured (too much so) as DW yet it's FREE, go figure!

As for "html files created by Word" go and wash your mouth out! Smile

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

n00ge
Offline
Regular
Last seen: 16 years 7 weeks ago
Timezone: GMT-5
Joined: 2004-01-02
Posts: 32
Points: 0

HTML or CSS Hacks for Dreamweaver MX

Ok, I've done some testing and I have finally found a way to hack CSS for Dreamweaver. By using @import url("dmx_hacks.css"); in a 'media="screen"' css file, you can put css hacks for dreamweaver in the "dmx_hacks.css" file. The main css file takes precedance over the dmx_hacks.css file in browsers. In Dreamweaver, the dmx_hacks.css file takes precedance. Just to be safe, I have included the star hack for IE, and the Mac-IE backslash hack. That way, even if some other browser renders like Dreamweaver, it won't have the applied styles because of the * html hack.

I'm still working on some minor adjustments before I post, so it isn't live yet. But it will be soon, if anybody is interested in viewing the code.

Also, it seems that DMX in NO WAY can hide elements through display:none or visibility:hidden; That kind of sucks, so I just adjusted height and width properties and used position:absolute to throw the elements off to the side of the screen.

Articles and personal work
http://www.creativeruin.com

n00ge
Offline
Regular
Last seen: 16 years 7 weeks ago
Timezone: GMT-5
Joined: 2004-01-02
Posts: 32
Points: 0

HTML or CSS Hacks for Dreamweaver MX

Actually, for whoever is interested, here is an even better hack for Dreamweaver MX:

/* commented backslash hack v2 \*/
* html div>div { }
/* end hack */

Articles and personal work
http://www.creativeruin.com

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 38 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

HTML or CSS Hacks for Dreamweaver MX

Thats an odd hack, the escape hack hides rules from IEMac and the star selector hack combined with a child combinator is a method of feeding rules to IEmac only :?

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

velo
velo's picture
Offline
Enthusiast
Fayettenam
Last seen: 13 years 27 weeks ago
Fayettenam
Timezone: GMT-5
Joined: 2004-11-11
Posts: 181
Points: 0

HTML or CSS Hacks for Dreamweaver MX

I am wondering why one needs a Dreamweaver hack at all. I use DW MX and love it....but I don't use any of its code either.

When I am building a site, I am always in code view and I just erase any code DW puts in the blank document and build my code. n00ge, you sound pretty knowledgable so just get away from the design view and hand code, that way you won't need any hacks for the DW code.

The other functions of DW are awesome timesavers. The new, robust find/replace function rocks, especially since you can replace all instances of a string sitewide without having to open the files.

It cleans up Word filth pretty well and the "strip tag" function clears out the rest. I really like the embedded FTP and it saves me a lot of time with not having to switch between programs. It understand HTML, CSS, JS, and PHP syntax and the consistent color-coding of the code is also a big timesaver when it comes to trying to read the page and debug.

Like anything else, DW is merely a tool. The skill belongs in the hands of the one who uses it.

Give a man a fire and he will be warm for a while. Set a man on fire and he will be warm for the rest of his life.

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 1 year 32 weeks ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

HTML or CSS Hacks for Dreamweaver MX

Hugo wrote:

Ed I realise that many do use the functionality of DW code view as a basic editor and can achieve what you do but that is through detailed knowledge of how it mangles code and what constitutes correct standards code, problem with DW is that it lures newbies into a trap where they think that coding building web pages is governed and only possible when using software such as DW, that is insidious and abhorrent.
Quote:

I agree, of course, but it's certainly better than Front Page or saving Word files as html. Talk about damning with faint praise, eh?

Hugo wrote:
also to use DW purely as a text editor just seems daft when you consider just how expensive it is, in the UK it used to be around £600; what planet are they on how on earth do they justify that much, I use HTML-Kit occasionally which is every bit as featured (too much so) as DW yet it's FREE, go figure!

Well my employer bought me DW so I basicaly got it for free and it's certainly a big improvement as a code editor over notepad. Mind you for a few things I do actually use notepad as well.

Quote:
As for "html files created by Word" go and wash your mouth out! Smile

*sigh*. Unfortunately I'm maintaining an intranet site with dozens and dozens of files saved from word to html. I'm slowly (very slowly!) cleaning that up as I get time.

I work in a Public Library and inhabit a nightmare-land of uncompliant and just plain illegal html that I don't even have access to all the time.

If you want a good shudder take a look at http://catalogue.gvpl.ca/. I'm not at all proud of this, but it was just a matter of making the site look the way senior staff wanted it to look. It's terrible code and I don't particularly like the look myself, but that's what I had to do.

On the other hand if you click on the "New Books" link on the above page you'll see some code I wrote from scratch and which at least does Validate. It uses a table it's true, but then it's tabular data.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 38 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

HTML or CSS Hacks for Dreamweaver MX

If DW was provided and I had little choice but to use it then I would, working around it's limitations as best as possible, I certainly would never purchase a copy.

Yep the link isn't great but it could be a good deal worse and at least it has a DTD. It's always depressing when one has to compromise ones principles it would be lovely not to have to but that just ant reality some of the time.

Velo I think the problem for n00ge is that as unskilled people are going to be updating the pages they will need to work with Design View/wysiwyg feature of DW which is what is causing the problems as these features just do not work as expected especially where CSS is concerned.

Interestingly nearly all those features that you mention in DW are available in HTML-Kit, as well as a provision for third party plugins which further extend it's functionality.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

larmyia
Offline
Elder
London
Last seen: 14 years 2 weeks ago
London
Timezone: GMT+1
Joined: 2005-01-25
Posts: 1060
Points: 0

HTML or CSS Hacks for Dreamweaver MX

velo, I think you're missing the point of n00ge's post. he does handcode, but the ppl he's working for want to be able to change their site and are insisting on using DW (for reasons of their own). however, as you know, the design view (which n00ge's client's will need to use) doesn't display things as it a browser will. and this will obviously confuse the client.

well, that's how I read it...

n00ge you are in a really difficult position. and really annoying if your company has a good cms (which ironically your client likes!). whether or not you sort out your DW woes, I think you're going to have to be firm with your client and explain the consequences of their decision. at the end of the day they have decided upon DW, and they have turned down a good CMS. So, now they pay the price.

you can only do what you can do!

larmyia

x-posted with Hugo Tongue shouldn't waffle so much.......

velo
velo's picture
Offline
Enthusiast
Fayettenam
Last seen: 13 years 27 weeks ago
Fayettenam
Timezone: GMT-5
Joined: 2004-11-11
Posts: 181
Points: 0

HTML or CSS Hacks for Dreamweaver MX

Quote:
I think you're missing the point of n00ge's post. he does handcode, but the ppl he's working for want to be able to change their site and are insisting on using DW
Oops, sorry, I did miss that. My bad. Thought the issues was slightly different.

To follow up what ragamuffin said, when a client wants to update content I make them pay me for the time to build a database interface so they can enter/edit content in a text field, preview, and submit. I am upfront with my clients and tell that if they start mucking about in the source code then they will end up paying me a lot more to fix all their screw ups.

n00ge, what about this- thinking about the problems the thought occured to me that you could create a site definition in dreamweaver that is limited to content-only pages? Put the content pages in a directory with nothing else in or below it. This way the client will only have access (yeah, i know it's not a sure thing) to the content pages and you can keep the page structure and formatting in parent levels and insert content using server-side includes. Just a thought, I would hate to have clients running rampant in the site files....<shudder>

Give a man a fire and he will be warm for a while. Set a man on fire and he will be warm for the rest of his life.

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 10 years 1 week ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

HTML or CSS Hacks for Dreamweaver MX

n00ge - can you persuade them to use contribute rather than DW. Contribute is specifically designed for allowing end users to update DW produced code/sites. DW, on the other hand, is designed to do anything with the site. I would think you will always have problems with the ill-experienced using DW - and your biggest problems will come from those that know HTML/CSS/Javascript & DW, but not how you have organised your website.

n00ge
Offline
Regular
Last seen: 16 years 7 weeks ago
Timezone: GMT-5
Joined: 2004-01-02
Posts: 32
Points: 0

HTML or CSS Hacks for Dreamweaver MX

It's a college so campus wide installs is not something I can persuade them to do. There are a few different departments that will work on it so just updating one computer won't work either.

I have made comments in the CSS file, and it's named dmx_hacks.css as well so it should be pretty obvious for future development. The files are also using Dreamweaver templates to ensure that those who don't know code don't mess anything up.

Articles and personal work
http://www.creativeruin.com

ragamuffin
ragamuffin's picture
Offline
Leader
Iowa
Last seen: 13 years 28 weeks ago
Iowa
Joined: 2005-06-02
Posts: 691
Points: 0

HTML or CSS Hacks for Dreamweaver MX

n00ge wrote:
It's a college so campus wide installs is not something I can persuade them to do. There are a few different departments that will work on it so just updating one computer won't work either.

That is what I don't understand. It would be logical to go the cms route...which doesn't need to be installed campus wide. With the cms, all they need to do is log into the cms via IE or FF instead of making sure each dept. has a licensed copy of DW.

Oh well, good luck with your client. Smile

- r

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 10 years 1 week ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

HTML or CSS Hacks for Dreamweaver MX

ragamuffin wrote:
That is what I don't understand.

I guess with lots of extremely bright students around the chance of being hacked is high - they probably know that from past experience. No server side scripting limits the hacking opportunities somewhat.

Laughing out loud

ragamuffin
ragamuffin's picture
Offline
Leader
Iowa
Last seen: 13 years 28 weeks ago
Iowa
Joined: 2005-06-02
Posts: 691
Points: 0

HTML or CSS Hacks for Dreamweaver MX

Chris wrote:
I guess with lots of extremely bright students around the chance of being hacked is high - they probably know that from past experience. No server side scripting limits the hacking opportunities somewhat.

Interesting point...whether they edit content through a cms or DW, isn't the security issue the same? I would think the college site could be more secure through a cms. :?

- r

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 10 years 1 week ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

HTML or CSS Hacks for Dreamweaver MX

Not really.

An html only site isn't susceptible in the same way that a script is and if hacked isn't as capable of as much damage.

DW only accesses the site through ftp and is subject to ftp restrictions. A script run on a webserver could gain access to the entire server.