I am coding a site right now using dreamweaver. I like using dreamweaver to see how things come out in the visual editor. Sometimes things work well in the visual editor, other times they look funky. I just coded the navigation for the site I am working on and I noticed that the last link in the list was wrapping down under the horizontal navigation even though I did not put a width rule on the ul. It looked fine in the browsers. So I decided to set a min-width rule to the ul and now in the visual editor of dreamweaver things look good. I was just wondering what you guys thought. Is it a good practice to set a minimum width to things when you don’t really need to set the actual width at all?
It sounds like you’re developing for x-amount of browsers + for dreamweaver. You’ll probably end up with quite a few headaches while trying to make it /also/ work in dreamweaver. It will also add to code bloat.
If you want to continue doing that, by all means, go ahead :p – but I wouldn’t suggest it to anyone. Get used to using an awesome text editor, like sublimetext2. I use ALT + TAB to switch between the editor and the browser. It’s really just as quick as it is in Dreamweaver to click on the visual tab. You may use split-view in dreamweaver… I sometimes split-view with a normal text editor and browser. Make half the screen the editor and the other half the browser. If you use linux or OSx, you could also have the browser in 1 workspace and the editor in another. I do all of those.
@cybershot – DW has suited me for most things but I feel it is sometimes limited when using the wysiwyg because it does not always give you the most accurate visual representation. I found this to a particular problem when creating a WordPress site but the alternative is simply use the selected browsers to render the code, rather than the wysiwyg. I think it is a good idea to learn sublimetext as well.
I am not using the visual editor for coding. I am only using it to see how it renders the page. I have found that by hand coding a site in dreamweaver, the visual editor can help you make better code in the way that you make changes that work great in the browser as well as dreamweaver. The goal is to end up with a site that looks exactly the same way in dreamweavers visual editor as it does in the browser. To me it just feels perfect when it looks the same in dreamweaver as it does the browser.
Of course I read all the responses. Everyone is missing my point. You guys stopped at dreamweaver. Go back and read my first post. You will see this question which was not at all answered
“Is it a good practice to set a minimum width to things when you don’t really need to set the actual width at all? “
I guess it is my fault for not explaining properly. I have found that it is entirely possible to get your site to display the same way in dreamweaver as it does in the browser. It gets a little more difficult when you use sliders, but it is possible. I have done it many times.
Now you might ask, why would you do that? Why would you want to try and get the site to display the same in dreamweaver as it does in the browser? Again, I have found that dreamweaver has some really nice tools and options that can help code a site. I do not rely on the visual editor to code a site. I simply like it to display the same. I have coded sites where dreamweaver has helped me realize that I was coding css that really didn’t need to be there. Other times I have found that it helped me find code that should be there. I hand code everything. I am not using the visual editor to write code. I simply use it to inspect my site. I like the new inspect features that cs5 has. It works better than firebug.
This thread turned into an argument about whether or not to use dreamweaver. Everyone avoided the actual question which I quoted above.
I appreciate everyone who has contributed to the discussion. I think I just did a poor job of explaining really what I was after. I guess in the end, I was curious if dreamweaver was showing me a bug that the browsers just don’t care about so they render the code properly. I was just wanting to find that bug and squash it which would have made dreamweaver display the nav properly. Yeah, I think that is how I should have explained it to start.
I found a perfect example of what I am talking about. I put a slider into my site. It display perfectly on all browsers. When I look in dreamweavers visual editor, the entire layout is broken. It is broken because all the slides are going down the front page and pushing into the footer and content area. So i added a clear: both to the footer and now the layout in dreamweaver is fixed. This is a rule I would not have added to the code if not for dreamweaver since the site looks fine and dandy in the browsers.
min-width is useful when you want an element to not fall below a set size. It forces it to a minimum size while letting it expand to it’s max-width or whatever you need it to. So it’s great when you need it for that role – if you don’t need it and still set it – I suppose it could be argued that it is bad practice, but it falls more in the realm of pointlessness. If you don’t need it, don’t use it.
On the subject of Dreamweaver – you said:
I like using dreamweaver to see how things come out in the visual editor. Sometimes things work well in the visual editor, other times they look funky. I just coded the navigation for the site I am working on and I noticed that the last link in the list was wrapping down under the horizontal navigation even though I did not put a width rule on the ul. It looked fine in the browsers. So I decided to set a min-width rule to the ul and now in the visual editor of dreamweaver things look good.
You should not look at it at all, it is a waste of time. Why? It will not help you making things look right in Dreamweaver because no one uses Dreamweaver visual editor to browse the web. Coding to make things look right in the visual editor of Dreamweaver will cause you more pain and confusion than any version of IE lol – and all for naught!
The reason no one answered your question was the fact that it was made moot by the point that you are only using it to make things look ok in Dreamweaver visual editor. If you are not using the visual editor, then you don’t need to fix it.
You should not look at it at all, it is a waste of time. Why? It will not help you making things look right in Dreamweaver because no one uses Dreamweaver visual editor to browse the web.
The reason no one answered your question was the fact that it was made moot by the point that you are only using it to make things look ok in Dreamweaver visual editor.
Oh yes, that is a good point. Adding code just to fix it in dreamweaver could be a waste of time. I like to do it because I really like my site to display properly in dreamweaver so that I can see the borders and everything else properly. I can tell you right now that it is 98% perfect for the site that I am working on right now. There is one bug that I can’t figure out yet. I do understand what you are saying though
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".