Results 1 to 8 of 8

Thread: Div tag hell! [Resolved]

  1. #1

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Resolved Div tag hell! [Resolved]

    I origionally designed an asp.net page using the visual studio designer, then incorperated a company standard css to format it which kind of worked fine. The backgroud is fine and the content is within a content container <div> tag. However I no longer seem to be able to reposition controls within the tag from where they are. As soon as I try to move them they jump to the top of the block into a flow type of layout. Ican reposition them on the page absolutely but would rather be able to drag and drop. It will probably be something simple but it has me baffled.
    Last edited by FishGuy; May 6th, 2005 at 10:46 AM. Reason: Resolved

  2. #2

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Re: Div tag hell!

    I have found that if i place all my controls in their own <div> tags then I can move them in design view however, it seems to be onnly working on some of them some of the time, occasionally if I switch to HTML view then back I can move some again. Does anyone know what the ? is happening. And is there a better way.

  3. #3

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Re: Div tag hell!

    Ok just found that each individual div tag has to be set to absolute positioning from the build style option then the controls can be dragged. I dont know why they cant always be moved without switching between views though perhaps its just a bug

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Div tag hell! [Resolved]

    You shouldn't even be using GridLayout/Absolute positioning in the first place. Use tables to place and align your controls.

  5. #5

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Re: Div tag hell! [Resolved]

    I dont want to open up a big debate as I mean this as a serious question What should grid/absolute be used for then if not positioning controls? I thought this method had advanced from the old tables based design for greater control.

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Div tag hell! [Resolved]

    GridLayout is a more visual method, making it easier to position your control. Not necessarily better. It can cause problems across resolutions, for one.

  7. #7
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704

    Re: Div tag hell! [Resolved]

    What mendhak is saying is you should learn Cascading Style Sheets and be done with it.

    The Designer is really just a training wheel / vehicle for newbie developers. It absolutely positions everything which would be considered poor design if it was written by a developer.

    I would even go as far as telling you to practice with creating html files in Notepad and trying positioning elements (divs for the most part), with css and never resort to positioning: absolute by default .

  8. #8

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Re: Div tag hell! [Resolved]

    Thanks, I have always previously used tables/frames for positioning and css just for formatting elements such as their size and font etc. But I will now look further into css and divs for positioning. I was unaware that the designer was for the newbies and thought it was just the new way of doing things, shame none of the books on .net etc made this clear and that bad quality code would be produced. Thimk il stick to the code view from now on.
    Thanks Guys.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width