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.

How do I centre my frame dead in the centre horizontally and vertically

Discussion in 'HTML & Website Design' started by smivers.com, Jul 23, 2009.

  1. #1
    Basically for example go to http://oa4.biz/fast

    I want that centred dead in the middle vertically and horizontally the top ads. I also want the counter on the right to be underkneeth the shorten your urls here.

    Here is the code I currently have.

    <html>
    
    <head>
    
    <style type="text/css">
    
    
    </style>
    
    </head>
    
    
    
    <body>
    
    
    
    
    
    <div id="none">
    <centre>
     <!-- Begin BidVertiser code -->
    <SCRIPT LANGUAGE="JavaScript1.1" SRC="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=67172&bid=611804" type="text/javascript"></SCRIPT>
    <noscript><a href="http://www.bidvertiser.com/bdv/BidVertiser/bdv_advertiser.dbm">pay per click</a></noscript>
    <!-- End BidVertiser code --> 
    
    <A HREF="index.html"><IMG BORDER="0" SRC="/img/shortenurl.JPG"></A> 
    
     <!-- Begin BidVertiser code -->
    <SCRIPT LANGUAGE="JavaScript1.1" SRC="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=67172&bid=611804" type="text/javascript"></SCRIPT>
    <noscript><a href="http://www.bidvertiser.com/bdv/BidVertiser/bdv_advertiser.dbm">pay per click</a></noscript>
    <!-- End BidVertiser code --> 
    
    
    &nbsp;
    
    <a href="http://www.easycounter.com/">
    <img src="http://www.easycounter.com/counter.php?bryntwr1011"
    border="0" alt="HTML Hit Counters"></a>
    <br><a href="http://www.easycounter.com/"></a>
    <br /><br />
    </centre>
    
    
    
    
    </div>
    
    
    
    <div id="none1">
    
    
    
    </BODY>
    
    </HTML>
    Code (markup):
    I just really dont know how to get it centred correctly.

    Thanks
     
    smivers.com, Jul 23, 2009 IP
  2. anthony.ownz

    anthony.ownz Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi there you currently have:
    <centre>
    <!-- Begin BidVertiser code -->
    <SCRIPT LANGUAGE="JavaScript1.1" SRC="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=67172&bid=611804" type="text/javascript"></SCRIPT>
    <noscript><a href="http://www.bidvertiser.com/bdv/BidVertiser/bdv_advertiser.dbm">pay per click</a></noscript>
    <!-- End BidVertiser code -->

    It should actually be:
    <center>
    <!-- Begin BidVertiser code -->
    <SCRIPT LANGUAGE="JavaScript1.1" SRC="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=67172&bid=611804" type="text/javascript"></SCRIPT>
    <noscript><a href="http://www.bidvertiser.com/bdv/BidVertiser/bdv_advertiser.dbm">pay per click</a></noscript>
    <!-- End BidVertiser code -->
    </center>
     
    anthony.ownz, Jul 23, 2009 IP
  3. smivers.com

    smivers.com Peon

    Messages:
    560
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It is centred but the tags closed after all 4 listings.

    I have tried centre on eahc like that and it didnt work.
     
    smivers.com, Jul 23, 2009 IP
  4. tianbo84

    tianbo84 Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Basically what I do is somewherer along the lines of this.

    <div style="height:70px; position:absolute;left:50%;top:50%; margin-top:-35px;">conten here</div>

    You will have to define a height for your div it should be 70px I think. In the margin-top put half the value, which would be -35px (this is so it doesn't set lower, because it usaully puts the div in the middle from the top, this stops that.

    
    <div style="height:70px; position:absolute;left:50%;top:50%; margin-top:-35px;">
     <!-- Begin BidVertiser code -->
    <SCRIPT LANGUAGE="JavaScript1.1" SRC="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=67172&bid=611804" type="text/javascript"></SCRIPT>
    <noscript><a href="http://www.bidvertiser.com/bdv/BidVertiser/bdv_advertiser.dbm">pay per click</a></noscript>
    <!-- End BidVertiser code --> 
    
    <A HREF="index.html"><IMG BORDER="0" SRC="/img/shortenurl.JPG"></A> 
    
     <!-- Begin BidVertiser code -->
    <SCRIPT LANGUAGE="JavaScript1.1" SRC="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=67172&bid=611804" type="text/javascript"></SCRIPT>
    <noscript><a href="http://www.bidvertiser.com/bdv/BidVertiser/bdv_advertiser.dbm">pay per click</a></noscript>
    <!-- End BidVertiser code --> 
    </div>
    <div style="height:18px; position:absolute;left:50%;top:50%; margin-top:10px;">
    <a href="http://www.easycounter.com/">
    <img src="http://www.easycounter.com/counter.php?bryntwr1011"
    border="0" alt="HTML Hit Counters"></a>
    <br><a href="http://www.easycounter.com/"></a>
    </div>
    
    Code (markup):

    Try maybe that you will probably have to play with the margin for the counter to set it right, I didnt really try this just type out fast. Sorry if its not what you were looking for.
     
    tianbo84, Jul 23, 2009 IP
  5. anthony.ownz

    anthony.ownz Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hey Tian, the code above that I posted is going to have it do just what he wanted which was to center his advertisement on the page. No need to get all technical on a page center but yes your method is the advanced way and is of course a little bit more challenging for a novice.

    Either way, both codes are going to achieve what he wants and that is the bottom line. :)
     
    anthony.ownz, Jul 23, 2009 IP
  6. smivers.com

    smivers.com Peon

    Messages:
    560
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    No doesnt work check what its done now.
     
    smivers.com, Jul 23, 2009 IP
  7. tianbo84

    tianbo84 Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Ahh I figured he wanted vertical align too... but I suppose with that small of a space wont matter much. I just tryt o stay clear from the center tag
     
    tianbo84, Jul 23, 2009 IP
  8. smivers.com

    smivers.com Peon

    Messages:
    560
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    ?? any idea of what to do now? check oa4.biz/fast its in middle of page now not on top frame.
     
    smivers.com, Jul 23, 2009 IP
  9. anthony.ownz

    anthony.ownz Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Hi there, did you add the closing center tag? </center> if so, simply remove it and that should post the block on the top of the frame.
     
    anthony.ownz, Jul 23, 2009 IP
  10. anthony.ownz

    anthony.ownz Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Which codes did you use as well? please post the updated coding.
     
    anthony.ownz, Jul 23, 2009 IP
  11. anthony.ownz

    anthony.ownz Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    <div style="height:70px; position:absolute;left:50%;top:50%; margin-top:-35px;">

    You used his code, thats your problem right there. You also neglected to put </div> to end the divider.

    Simply replace his code with my <center> tag and your problem is solved.
     
    anthony.ownz, Jul 23, 2009 IP
  12. smivers.com

    smivers.com Peon

    Messages:
    560
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #12
    <html>
    
    <head>
    
    <style type="text/css">
    
    body { margin : auto; height:100%; }
    
    
    #none { margin : auto; }
    
    
    
    </style>
    
    </head>
    
    
    
    <body>
    
    
    
    
    
    <div id="none">
    <div style="height:70px; position:absolute;left:50%;top:50%; margin-top:-35px;">
     <!-- Begin BidVertiser code -->
    <SCRIPT LANGUAGE="JavaScript1.1" SRC="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=67172&bid=611804" type="text/javascript"></SCRIPT>
    <noscript><a href="http://www.bidvertiser.com/bdv/BidVertiser/bdv_advertiser.dbm">pay per click</a></noscript>
    <!-- End BidVertiser code --> 
    
    <A HREF="index.html"><IMG BORDER="0" SRC="/img/shortenurl.JPG"></A> 
    
     <!-- Begin BidVertiser code -->
    <SCRIPT LANGUAGE="JavaScript1.1" SRC="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=67172&bid=611804" type="text/javascript"></SCRIPT>
    <noscript><a href="http://www.bidvertiser.com/bdv/BidVertiser/bdv_advertiser.dbm">pay per click</a></noscript>
    <!-- End BidVertiser code --> 
    </div>
    <div style="height:18px; position:absolute;left:50%;top:50%; margin-top:10px;">
    <a href="http://www.easycounter.com/">
    <img src="http://www.easycounter.com/counter.php?bryntwr1011"
    border="0" alt="HTML Hit Counters"></a>
    <br><a href="http://www.easycounter.com/"></a>
    </div>
    
    
    
    
    
    <div id="none1">
    
    
    
    </BODY>
    
    </HTML>
    Code (markup):
     
    smivers.com, Jul 23, 2009 IP
  13. tianbo84

    tianbo84 Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    smivers - that code you should put in your top frame you were using. If you are not going to use a frame than youw ould have to wrap it in a div with a relative position and what not.

    I would use anothy's way if you can live with it not being vertically aligned
     
    tianbo84, Jul 23, 2009 IP
  14. smivers.com

    smivers.com Peon

    Messages:
    560
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Im confused, I just want it vertically aligned at the top of the page and and horizontally, within the small frame at the top. So its like a toolbar at the top of the page.
     
    smivers.com, Jul 23, 2009 IP
  15. anthony.ownz

    anthony.ownz Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    That is true Tian, but they are a novice and your code is too complex as you can see for them.
     
    anthony.ownz, Jul 23, 2009 IP
  16. anthony.ownz

    anthony.ownz Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Tian do you want to help them implement your code correctly? or do you want me to assist them further? your code is perfect for what they wish to achieve but its a pain in the butt for him to figure out how to install it correctly.
     
    anthony.ownz, Jul 23, 2009 IP
  17. smivers.com

    smivers.com Peon

    Messages:
    560
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #17
    anthony.ownz.. Correct lol :)

    I just dont understand it. Its fine how it is at the top it just needs to be aligned to the centre. Along with the counter being underkneeth the shorten your url image.
     
    smivers.com, Jul 23, 2009 IP
  18. anthony.ownz

    anthony.ownz Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #18
    <center>
    <!-- Begin BidVertiser code -->
    <SCRIPT LANGUAGE="JavaScript1.1" SRC="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=67172&bid=611804" type="text/javascript"></SCRIPT>
    <noscript><a href="http://www.bidvertiser.com/bdv/BidVertiser/bdv_advertiser.dbm">pay per click</a></noscript>
    <!-- End BidVertiser code -->
    <A HREF="index.html"><IMG BORDER="0" SRC="/img/shortenurl.JPG"></A>
    <!-- Begin BidVertiser code -->
    <SCRIPT LANGUAGE="JavaScript1.1" SRC="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=67172&bid=611804" type="text/javascript"></SCRIPT>
    <noscript><a href="http://www.bidvertiser.com/bdv/BidVertiser/bdv_advertiser.dbm">pay per click</a></noscript>
    <!-- End BidVertiser code -->
    </div>
    <br>
    <a href="http://www.easycounter.com/">
    <img src="http://www.easycounter.com/counter.php?bryntwr1011"
    border="0" alt="HTML Hit Counters"></a>


    TRY THE ABOVE :)
     
    anthony.ownz, Jul 23, 2009 IP
  19. smivers.com

    smivers.com Peon

    Messages:
    560
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #19
    Nearly there take a look.
     
    smivers.com, Jul 23, 2009 IP
  20. anthony.ownz

    anthony.ownz Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #20
    Seen you edited the code, re-edit it as I edited the above so the ad's are actually centered. enjoy!
     
    anthony.ownz, Jul 23, 2009 IP