Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Sep 2010
    Posts
    2
    Member #
    23622
    hello 2 all
    I have a "question" about how to use absolute and relative positioning.
    Actually i want to add 2 banners (ads) on may web site, outside the "container". Where the container is the very first div of my site, containing all divs.

    The website width is 1000px, and when i'm opening the site in a bigger resolution i want to see the banners in the left and right, but without affecting my content. If the resolution is not big enough the banners have to sweep under the content ("container" div).

    As far as i know i have to use absolute and relative positioning. i found few ways to do that but in other browsers like ie, chrome, safari i meet some problems.

    I've seen few website with banners positioned like these, so there must be a way to do that. Can anyone help me with this?
    tks in advance and sry for my English. ;-)

  2.  

  3. #2
    Junior Member zeroality's Avatar
    Join Date
    Jul 2006
    Posts
    14
    Member #
    13486
    .container {position:relative;}

    .ad1 {position:absolute; left:-100px; top:50px;}

    .ad2 {position:absolute; left:600px; top:50px;}

    Put both ad1 and ad2 within the container div so they will position properly. They won't show up inside thanks to being absolutely positioned relative to the container. Change left/top dimensions as needed.

  4. #3
    Junior Member
    Join Date
    Sep 2010
    Posts
    2
    Member #
    23622
    tks man

  5. #4
    Junior Member prestashopic's Avatar
    Join Date
    Sep 2010
    Posts
    1
    Member #
    23815
    Quote Originally Posted by zeroality View Post
    .container {position:relative;}

    .ad1 {position:absolute; left:-100px; top:50px;}

    .ad2 {position:absolute; left:600px; top:50px;}

    Put both ad1 and ad2 within the container div so they will position properly. They won't show up inside thanks to being absolutely positioned relative to the container. Change left/top dimensions as needed.
    thanks for tips zeroality. it really solve my problem also.

  6. #5
    Member Fraze's Avatar
    Join Date
    Sep 2010
    Posts
    34
    Member #
    23378
    nice i've been looking for something similar, need to start making some more cash monies )
    | Todd Fraser
    | http://www.toddfraser.co.uk
    | toddfraserdesign.wordpress.com

  7. #6
    Junior Member
    Join Date
    Oct 2010
    Posts
    7
    Member #
    24098
    you can add a new div and resize banner banner html code.

    You can add a new div tag and resize that tag to your desirable size and copy and paste the ad code you wich to display or you can view the html code of this ad and see where it says "WIDTH=" & "HEIGHT=" and change the values to match that of your div tag insert.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:50 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com