NetTalk Central

Author Topic: Placing a DIV or Graphic down the side of a form or browse  (Read 2213 times)

Devan

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Email
Placing a DIV or Graphic down the side of a form or browse
« on: April 01, 2012, 08:38:50 PM »
Another client request out of left field here...  They're pretty happy with the web app we've designed for them so far, but now have requested the ability to place graphical ads or other notifications that are displayed on the LEFT or RIGHT hand side of a form or Browse screen.

So, basically, the 'ads' will take up a fair amount of vertical space without impinging on the form or browse that may be contained in the middle.

What would be the best way, or the best embed point to do this?  I am assuming that we can simply add a couple of <DIVS> before and after the form/browse <DIV>.  Any special styles we need to apply to keep the three <DIVS> nicely aligned left to right?

Thanks!
Devan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11239
    • View Profile
Re: Placing a DIV or Graphic down the side of a form or browse
« Reply #1 on: April 01, 2012, 10:53:47 PM »
Hi Devan,

I would do this actually as part of the "header".
This sounds strange, but actually works well. The header is on every page, and the "content" takes up the space not occupied by the header, so everything just fits together well.

You see this approach used internally when you use a vertical menu (like Accordion) - that's part of the header, but takes up the left side of the screen.

Obviously the exact mechanics will depend a bit on your app but try something like this;

<div id="ads" style="height:100%; width:150px; right-margin:15px; float:left;">
Adds go here
</div>

obviously you can make your own css class for the div. To make it float of the right set the float to right, and change the margin-right to margin-left.

the next step is probably to put it in a NetWebSouce procedure (still called from the header) where you can then flesh out the content etc.

cheers
Bruce