Results 1 to 10 of 10

Thread: web form design - positioning and sizing

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2003
    Location
    NYC
    Posts
    50

    web form design - positioning and sizing

    Is there a better way to do this?

    I just realized that I need to use percentages to set the width, height, left and top properties of my web controls to make my pages fit any browser window size at any screen resolution. But I have two problems:

    1. Left and Top (the positioning attributes) are only available in HTML view. Can't I get these in the properties window so I can just quickly click through my form? It will take quite a while to position a lot of elements by altering tags in the HTML view. And without seeing the form, there will be a lot of trial and error.

    2. Will the look of the page be silly if I use ONLY percentages? When a really small browser is opened you would see a tiny page perfectly in proportion to the window.

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

    Re: web form design - positioning and sizing

    Originally posted by soskinny
    Is there a better way to do this?

    I just realized that I need to use percentages to set the width, height, left and top properties of my web controls to make my pages fit any browser window size at any screen resolution. But I have two problems:

    1. Left and Top (the positioning attributes) are only available in HTML view. Can't I get these in the properties window so I can just quickly click through my form? It will take quite a while to position a lot of elements by altering tags in the HTML view. And without seeing the form, there will be a lot of trial and error.

    2. Will the look of the page be silly if I use ONLY percentages? When a really small browser is opened you would see a tiny page perfectly in proportion to the window.
    Something escapes me. Why are you using left and top for your controls? Are you using absolute positioning?

    You really don't need to. You can create a table, and multiple-nested tables if required, for the purpose of positioning your elements.

    Without seeing the form, it will be trial-and-error only at first. Soon, you'll be good enough so that you don't even need to look at the page that often.

  3. #3
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018
    Yup. Absolute positioning sucks big time.

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

  5. #5

    Thread Starter
    Member
    Join Date
    Dec 2003
    Location
    NYC
    Posts
    50
    Yes, I was using absolute positioning, and yes, it sucks big time. It felt so right when I was just dragging and dropping and then resizing every control, though!

    How do I change absolute positioning? When I drag a control onto my web form it just sets the attribute to absolute positioning. Do I have to type over each attribute in HTML view? What is the alternative to absolute positioning?

    What is my overall strategy? Based on your input, I'm thinking:

    1. Design an HTML Table in the shape of my page with all rows and columns using percentages and I guess make the table invisible.

    2. Place the controls in the table.

    I wrote an entire database enabled application, but I'm clueless on this formatting part.

    Thanks.

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

    Your 'strategy' seems fine. You'll come across the nuances along the way, which will be just minor things.

  7. #7

    Thread Starter
    Member
    Join Date
    Dec 2003
    Location
    NYC
    Posts
    50
    Thanks. I guess I'd better dig in.

    Anything I need to know about flow layout? Will it eliminate Left and Top attributes?

  8. #8
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Yes. You will use things like topmargin and leftmargin, and CSS instead for all your alignment and positioning.

  9. #9
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    1. Go to www.w3schools.com/html
    and
    www.w3schools.com/css

    2. Take a look at www.mendhak.com/main.php html code. Save it to disk as an HTML page, delete all the javascript, and take a look at the layout of the tables. It'll give you a good idea of the way things should be.

    I of course, mention mendhak.com out of sheer shameless self promotion.

  10. #10

    Thread Starter
    Member
    Join Date
    Dec 2003
    Location
    NYC
    Posts
    50
    thanks, mendhak. I'll definitely hit all of that stuff...

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