Need help with aligning a poll:

Discussion in 'HTML & Website Design' started by sarsh11, Sep 23, 2009.

  1. #1
    So I just went to addpoll.com and got myself a new poll which I want to add on my site:

    Well now the problem is I want to know how to add the poll to the left of the search box on my site[in screenshot] like this:

    [​IMG]

    So how do i do it? Any help is appreciated :)
     
    sarsh11, Sep 23, 2009 IP
  2. SearchBliss

    SearchBliss Well-Known Member

    Messages:
    1,899
    Likes Received:
    70
    Best Answers:
    2
    Trophy Points:
    195
    Digital Goods:
    1
    #2
    Try this:
    <p style="float:left;padding:5px 5px 5px 5px">
    <!-- addpoll.com flash poll --><script type="text/javascript" src="http://www.addpoll.com/js/swfobject.js"></script>
    <div id="write_flash"><embed width="300" height="300" flashvars="questionId=38936" quality="high" name="flashpolls" id="flashpolls" style="" src="http://www.addpoll.com/flashPoll.swf" type="application/x-shockwave-flash"/></div>
    <script type="text/javascript">
    var so = new SWFObject("http://www.addpoll.com/flashPoll.swf", "flashpolls", "300", "300", "9");
    so.addVariable("questionId", "38936");
    so.write("write_flash");
    </script>
    <!-- /addpoll.com flash poll -->
    </p>
    Code (markup):
    Then change the padding to the desired position. From left to right, the padding is top, right, bottom, left.
     
    SearchBliss, Sep 23, 2009 IP
    sarsh11 likes this.
  3. sarsh11

    sarsh11 Active Member

    Messages:
    959
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    70
    #3
    Uhh tried that, doesnt work as it pushed the rest of the content downwards..I think it needs a new <div> to be created with the required position of the box? CSS?

    Thanks for trying :)
     
    sarsh11, Sep 24, 2009 IP
  4. Spawny

    Spawny Well-Known Member

    Messages:
    252
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    110
    #4
    try absolute positioning

    
    <div style="width: 300px; position: absolute;top:300px;left:50%;margin-left:-400px;">
    <!-- addpoll.com flash poll --><script type="text/javascript" src="http://www.addpoll.com/js/swfobject.js"></script>
    <div id="write_flash"><embed flashvars="questionId=38936" quality="high" name="flashpolls" id="flashpolls" style="" src="http://www.addpoll.com/flashPoll.swf" type="application/x-shockwave-flash" width="300" height="300"></div>
    <script type="text/javascript">
    var so = new SWFObject("http://www.addpoll.com/flashPoll.swf", "flashpolls", "300", "300", "9");
    so.addVariable("questionId", "38936");
    so.write("write_flash");
    </script>
    <!-- /addpoll.com flash poll --> 
    </div>
    
    HTML:
    adjust top:300px and margin-left:-400px; to position
     
    Spawny, Sep 24, 2009 IP
    sarsh11 likes this.
  5. sarsh11

    sarsh11 Active Member

    Messages:
    959
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    70
    #5
    Thanks man! +Rep Added to both SearchBliss and Spawny :)
    Depending on the poll results I might change the template,I was wondering if you would be able to code the template to work with the script? I will be making it very simple with just the search box in the page and a few links..how much do you think it would cost to get it coded?
    Thanks again :)
     
    sarsh11, Sep 24, 2009 IP
  6. SearchBliss

    SearchBliss Well-Known Member

    Messages:
    1,899
    Likes Received:
    70
    Best Answers:
    2
    Trophy Points:
    195
    Digital Goods:
    1
    #6
    Thanks for the rep.
     
    SearchBliss, Sep 24, 2009 IP