locked
Rookie Beginner Having Difficulty with <div> Tags RRS feed

  • Question

  • I'm working through a "Sam's Teach Yourself" tutorial for Expression Web 4 SP2 and cannot get a <div> tag to appear when I drag it from the Toolbox into Design View.  The manual shows a long horizontal box in Design View appearing when you do this, but when I do it, nothing at all appears.  Only Code View shows the tags:
    <div>
    </div>.

    I can't proceed with the CSS tutorials if I can't even get basic things like this to show up in Design View as they show they should.  I'm running EW4 SP2 on Windows XP Pro SP3.  Are there any known issues with running it on this older OS?  Sam's says it's compatible.  I'd certainly appreciate any help on this.

    Friday, June 29, 2012 10:26 PM

All replies

  • If there is nothing in the div, it will display in Design View exactly as an empty div would in a browser: nothing would be displayed.

    If you are working in Design View, you probably want to set your Visual Aids to display empty containers, among other things, so you see more than what a browser would display.  :)



    • Edited by KathyW2 Friday, June 29, 2012 11:06 PM
    Friday, June 29, 2012 10:35 PM
  • Put something in it and it will show up. Even just a nonbreaking space will do.

    Do not get too comfortable working in the Design Pane. While you can do some things there, there are many thing that you cannot. Get used to at least studying the Code Pane now as you work, with the goal of working in there primarily in the near future.

    One of the big problems of working in the Design Pane is that when you drag something (like a div) or the move the edge of a div with the mouse, EW willautomatically turn that div into a layer (absolutely positioned div) and that will cause all sorts of problems on visitors' computers. It's not EW's fault. That's the only option it has when you do that. So don't do that! And never ever ever ever use layers. Ever. You've been warned. ;-) There are so few uses for them and so many pitfalls, you might as well pretend that they don't exist.


    A call to action:
    What do we want?!
    Time travel!
    When do we want it?!
    That's irrelevant!

    Friday, June 29, 2012 10:55 PM
  • My best advise is to get accustomed to working in "split" mode, with your focus pinned on the code pane. Also, I might recommend a tutorial that teaches you html+CSS, as you can do amazing things with div's using CSS.

    Enjoy!

    Saturday, June 30, 2012 4:57 AM
  • I'm going to agree with Paul and tell you to work in split view. You may also want to take advantage of some of the video tutorials in the FAQ post. Some of them were created with older versions of EW but the principles are still the same, only some menu items have moved and a different color scheme.

    Free Expression Web Tutorials
    For an Expression Web forum with without the posting issues try expressionwebforum.com

    Tuesday, July 3, 2012 10:52 PM
  • I was somewhat perplexed by the DIV behavior -- couldn't get them to drop where I wanted from the toolbox. I probably wasn't doing something right. Then I discovered a nice method of putting in DIVs if you are in Design view:

    1. Highlight a block (text, headings, whatever) that you want inside DIVs.

    2. Right-click <div> in the Tags section of the Toolbox, and choose "Wrap" from the popup menu.

    If you go into Code view, you'll see whatever you selected nestled in DIV tags. 

    Hope that helps anyone.

    Tuesday, July 10, 2012 8:58 PM
  • The OP was talking about putting a new div on the page, not putting existing text in a div, just as a matter of clarification.   You can do it either way, of course.  And EW lets you do most things in multiple ways.
    Wednesday, July 11, 2012 12:44 AM