Jump to content
piano0011

horizontal line not showing at the right place

Recommended Posts

Hey guys!

I am trying to add some horizontal rules to the following code and there should be one right before my second h2 tag (which is located at the end of the code) but it is showing a bit lower instead as shown below;... do I have to use position relative to move it, is this a common practice for this element?

 

 while ($row = mysqli_fetch_assoc($result))  {

                               
                                 echo '<div class="update_heading">';
                                 echo '<b><h2>Below are your premium membership information for Level 1</b></h2>';
                                 echo '</div>';
                                 echo '<br></br>';
                                 echo '<div class="update_text">';
                                 echo '<h3>';
                                 echo 'Your premium membership subscription plan A is: <div class="information">'.$row['subscriptionplan'].'</div>';
                                 echo '<br></br>';
                                 echo 'Your premium membership date of subscription for subscription plan A is: <div class="information"> '.$row['subscriptionplandate'].'</div>';
                                 echo '<br></br>';
                                 if ($row['feesmonthly'] === null) {
                                     echo 'Your premium membership fee for subscription plan A is: <div class="information"> $'.$row['feesyearly'].'</div>';
                                 } else {
                                     echo 'Your premium membership fee for subscription plan A is: <div class="information"> $'.$row['feesmonthly'].'</div>';
                                 }
                                 echo '<br></br>';
                                 if ($row['paid'] == 0) {
                                      echo 'Your premium membership payment status for subscription plan A is: <div class="information"> Not paid </div>'; 
                                 } else {
                                      echo 'Your premium membership payment status for subscription plan A is: <div class="information">Paid</div>';
                                 }
                                 echo '<br></br>';
                                 echo 'Your premium membership expiry date for subscription plan A is: <div class="information">'.$row['expirydate'].'</div>';
                                 echo '<br></br>';
                                 echo 'Your premium membership paid by date for subscription plan A is: <div class="information">'.$row['paidbydate'].'</div>';
                                 echo '<br></br>';
                                 if ($row['emailreminder'] == 0) {
                                    echo 'You have <div class="information">no overdue fees </div> for subscription plan A';
                                 } else {
                                      echo 'You have <div class="information"> overdue fees </div> for subscription plan A';
                                 }
                                 echo '<br></br>';
                                 if ($row['activate'] == 0) {
                                    echo 'You <div class="information">need to activate</div> your premium membership for subscription plan A';
                                 } else {
                                      echo 'You <div class="information">have already activated</div> your premium membership for subscription plan A';
                                 }
                                 echo '<br></br>';
                                 echo '<br></br>';
                                 echo '</h3>';
                                 echo '</div>';
                                 echo '<hr>';
                                 echo '<div class="update_heading2">';
                                 echo '<b><h2>Below are your premium membership information for Level 2</b></h2>';
                                 echo '</div>';

image.thumb.png.003bb537e1d3b19fd70716249caa1f81.png

Edited by piano0011

Share this post


Link to post
Share on other sites

Have you tried putting it where you want - right before the h2 tag?

You also need to learn about nesting tags correctly - yours overlap as shown below.

As header tags result, usually, in bold text, why are you even adding <b> tags?

echo '<b><hr><h2>Below are your premium membership information for Level 2</b></h2>';
       |       |                                                            |    |
       +-------|------------------------------------------------------------+    | 
               |                                                                 |
               +-----------------------------------------------------------------+

Share this post


Link to post
Share on other sites

I just tried it above the h2 tag as follows, without the position property but it looks like this:

 

image.thumb.png.b4eb97983cacfdec0ef625ee0590106f.png

Share this post


Link to post
Share on other sites

Having seen some of your previous css code I am going to guess that you have so many items with relative positioning that things can crop up anywhere.

Comment out all of your css styling and see where things land.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.