1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Cache Problem of DIV

Discussion in 'CSS' started by sumitt_2004, Mar 20, 2008.

  1. #1
    Hi!,

    There is a google cache problem in my site. I attached a image below having same structure as my site. Right now crawling schedule of google is Header - Layer1 - Layer2 - Layer3 in last Footer but I want to change the crawling schedule but don't want to change the structure of the site. The crawling must be header - Layer2-Footer-Layer3-Layer1. Can anyone help me in it. Plz check below image for srudy.

    [​IMG]
     
    sumitt_2004, Mar 20, 2008 IP
  2. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Teh googlies are looking at your HTML from top to bottom. You can change your HTML order to make teh googlies go in the order you want (tho I have no clue why it should matter) and use CSS to make the page still LOOK the same.

    Since you're using the word "layers" I'm afraid that you might be using dreambeaver and thus don't know how to use CSS... I'm also going to assume some things about your site cause the image doesn't do it justice. I'm going to write out your page in pseudo-code (not real, but shows you where stuff goes).

    HTML (in the order you want for teh googlies):
    
    <body>
    <header></header>
    <wrapper>
    <layer2></layer2>
    <footer></footer>
    </wrapper>
    <layer3>
    </layer3>
    <layer1>
    </layer1>
    </body>
    
    Code (markup):
    There, that's your site. Now I'm going to assume that your middle part (layer2) is liquid width (stretches with the browser window) while the sidebars are set width (and I'm not going to try % because I'm not sure how great that works, although you are free to try it if that's the case). For demonstration I'll assume the sidebars are 200px width.

    
    body stuff, header stuff...
    #wrapper {
      width: 100%; (necessary for this to work)
      float: left; (necessary)
      overflow: hidden; (if you want to wrap floats)
    }
    #layer2 {
      margin: 0 200px; (makes room for sidebars on each side)
    }
    #footer {
    whatever... in case the sidebars are longer than the layer2 you should also give sidemargins to the footer like margin: 0 200px; as well
    }
    #layer3, #layer1 {
      width: 200px; (set width)
      float: left; (so it can has funky margins)
      margin-left: -200px; (wraps the float up to the right side of the wrapper)
    }
    #layer1 {
      left: -100%; (moves this part all the way to the left as well)
    }
    
    Code (markup):
     
    Stomme poes, Mar 20, 2008 IP
  3. sumitt_2004

    sumitt_2004 Peon

    Messages:
    154
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks Stomme Poes for your valuable suggestion. Actually, I don't know much about CSS so I am trying your idea now. If it works then I will surely mention it here.
     
    sumitt_2004, Mar 20, 2008 IP
  4. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It's kindof a tricky CSS trick. If you're using dreambeaver, you'll have to be extra careful. I would recommend checking your HTML and CSS via the online W3C validators, not dw's, to triple check that the code is good. I've had one browser or another lose the sidecolumns because I didn't have things just right.
     
    Stomme poes, Mar 21, 2008 IP