top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Providing space between?

0 votes
257 views

I have a situation where I cannot change the css files but not html/php. I have two buttons in the page with ID's "moveprevbtn" and "movenextbtn". They are at present closely located. Using CSS or using any scripts I need to spread them away. I am not being able to do it.

With CSS I tried something like this,

#moveprevbtn {
    background: transparent url(myPreviousImage.png) 0 0 no-repeat;
    position: relative;
    top: -30px;
}

#movenextbtn {
    background: transparent url(myNextImage.png) 0 0 no-repeat;
    position: relative;
    top: 0;
}

But didnt help me much. Any suggestion.

I am talking in context of PHP/MySql

posted Jul 1, 2014 by Rahul Singh

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

It looks like you are looking to have the buttons side-by-side and just spaced further apart. If that is correct, this would work.

#moveprevbtn {
    position: absolute;
    left: 30px;
}

#movenextbtn {
    position: absolute;
    right: 30px;
}

ALTERNATIVELY:

you could just add space between the two buttons like this:

#moveprevbtn {
    position: relative;
    margin-left: -30px;
  }

#movenextbtn {
    position: relative;
    margin-right: -30px;
}

The first option will put your buttons 30px from the right and 30px from the left side of your view port.

The second will should simply subtract space on the opposing sides of your buttons which adds space between the two.

answer Jul 3, 2014 by Devyani
Similar Questions
+1 vote

I want to apply css for a while looping but it returns only the first data if i use css , and without css it returns all the data normally. here is my code it's simple.

$users=mysql_query("select * from users");
        while($user=mysql_fetch_array($users))
        {
        echo "<table>";
        echo "<tr>";
        echo "<td class='user'>";
        echo $user['pseudo'];
        echo "</tr>";
        echo "</td>";
        echo "</table>";
}
...