www.webdeveloper.com
Results 1 to 8 of 8

Thread: DIV Tags - The Complexities

Hybrid View

  1. #1
    Join Date
    Feb 2007
    Posts
    9

    DIV Tags - The Complexities

    I am currently re-designing my site to be Search Engine Friendly.

    I have found that it is better for search engine spiders to crawl DIV tags than what I have which is one table with 2-3 nested tables inside.

    Below is a link to the layout of what i want. The proportions are roughly right.

    Check the Layout here

    Obviously this will be a project in it's own right to tackle using DIV tags.

    I'm not asking anyone to do this (although would be great ). I'm also fairly new to DIV tags but can easily learn, i understand how they work and can use them but not to this complexity
    I'm asking if someone can tell if I'm wasting my time and should re-consider the table but with a better code design (not layout, code design)

    Cheers

  2. #2
    Join Date
    Mar 2006
    Location
    Newcastle NSW Australia
    Posts
    4,033
    This is NOT the way to move from table-less layouts. You are still THINKING tables - rigid boxes each containing a piece to be positioned accurately like a jigsaw puzzle.

    The whole point of current web practices is to emphasise CONTENT - first you have content, THEN you style that content to give the visual presentation you require. No content = nothing to style = no layout. This WILL involve thinking differently, where you will be positioning logically-grouped objects such that their relationship to other objects is determined similar to stacking blocks, and their positioning and/or size is allowed to move depending on browser resolution. Gone will be the days of slicing up a photoshop graphic and rigidly reassembling the pieces on the page - there is nothing wrong with laying out a design in Photoshop, just that you will use the individual objects rather than flattening and slicing the overall image.

    So first think about the content of the site, then mock up an image of how you might want that content displayed, and then we can help further.

    Cheers
    Graeme

  3. #3
    Join Date
    Oct 2006
    Location
    Colorado Springs
    Posts
    134
    So you want to make that layout as a table, and then put each box inside a div? a lot of people would probably say use CSS... which i would also say.. do you have an example with content?

    edit: ya, what graeme said
    i made me a website
    www.HookedOnWinter.com

  4. #4
    Join Date
    Feb 2007
    Posts
    9
    Heres what I have it looking like at the moment using Tables and nested tables at that (the reason I wish to use Div's)

    Click Here

    Put this against the Layout Here to roughly see what I'm getting at.

    I understand what your saying but I like this design and wish to stick with it.

    If this is too farfetched of a layout to do with DIV's let me know

  5. #5
    Join Date
    Mar 2006
    Location
    Newcastle NSW Australia
    Posts
    4,033
    Quote Originally Posted by SeanJenkins
    Heres what I have it looking like at the moment using Tables and nested tables at that (the reason I wish to use Div's)

    Click Here

    Put this against the Layout Here to roughly see what I'm getting at.

    I get 404 errors with both those links...

  6. #6
    Join Date
    Feb 2007
    Posts
    9
    Yea you will do now because I have cancelled that hosting service!

    Not too worry. I have some good answers


    Thanks for all that gave advice. Appreciated

  7. #7
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    Scrap the tables and the divs to start with and begin with semantic HTML where the tags identify what the content is. Style that as far as possible to get the effect you want and only add extra divs where absolutely necessary. Using CSs properly can produce layouts that are impossible with tables because you are not restricted to a grid structure and can even overlap elements. Simply set the margins, padding, width, float, and clear attributes for the appropriate elements to position them relative to the preceding elements in your page unless you actually need things to overlap (which can't be done with tables anyway) and then you would need to use position:relative with a nested position:absolute to position one element over another. Build it up one piece at a time and you will find it much easier than trying to create the entire layout in one go.

    If it can be done with tables then it can be done with CSS and often doesn't even require any div tags at all. CSS can also produce many layouts that tables can't.
    Stephen

  8. #8
    Join Date
    Feb 2007
    Posts
    9
    Yeah I just been learning about DIV's in more detail and it has come to my attention that i underestimated CSS and it's flexibility and power.

    But I deifinetly hear what your saying you say bit-by-bit, this makes it so much simpler

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles