How to check which div is visible while scrolling?

Web design: CSS Div layout and positioning help?

  • Hi, I'm new to divs and css, and I want to make a layout with 3 Divs; a banner at the top, a left menu, and content on the right. Can you please help me and check to see if this is correct coding? <div style="width:760px;">banner</div> <div style="width:150px; float:left;">menu</div> <div style="width:610px; float:left;">content</div>

  • Answer:

    It looks good for the most part, but the content should float right if you want it on the right side and you should center the banner or by default, it'll just stay on the top left hand side of the screen. For positioning, I'd recommend making an external stylesheet you're using inline styles but you can just as easily make div ids for all of these like so: #banner { } and so on... which would allow you to have more control over positioning, centering and whatever else you may need. And then back in your HTML just call it like this: <div id="banner"><!-- image goes here --></div>

XXX at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.