Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8847391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:10:47+00:00 2026-06-14T12:10:47+00:00

Here is what i try to do: I load my tags from MYSQL, and

  • 0

Here is what i try to do:

I load my tags from MYSQL, and i use css, to make them look nice. But when one tag field is empty, it still apear the border and the padding … as an empty box, with no text inside. How to make, to not display that border and padding when the tag field is empry?

HTML code:

<a  href="#<?php echo $tag1;?>.php" class="tag" style="position: relative; top: 0px"><?php echo $tag1;?></a>

CSS code:

.tag {
-moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
-webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
box-shadow:inset 0px 1px 0px 0px #ffffff;
background-color:#ededed;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
border:1px solid #dcdcdc; 
display:inline-block;
color:#777777;
font-family:arial;
font-size:10px;
font-weight:bold;
padding:2px 5px 2px 5px;
text-align:left;
text-decoration:none;
text-shadow:1px 1px 0px #ffffff;
float:left;
margin:5px 0px 0px 5px;
}.tag:hover {
background-color:#dfdfdf;
}.tag:active {
position:relative;
top:1px;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:10:48+00:00Added an answer on June 14, 2026 at 12:10 pm

    Why not only render valid tags?

    <?php if(strlen($tag1) > 0) { ?>
    
    <a  href="#<?php echo $tag1;?>.php" class="tag" style="position: relative; top: 0px"><?php echo $tag1;?></a>
    
    <?php } ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I try to load an object( a row ) from mysql database, the
I try to us wp_enqueue_script to load my javascript, here is my code: <?php
This is my first question here so try to make my best so you
What is it I am doing wrong here: When I try to use the
Edit: it's hard to describe what I'm trying to do, but here's a try
Ok, i don't know how call it but here i'll try to explain it...
I need to use a DLL file from qsBarcode http://www.qsbarcode.de/en/index.htm (here is the download
I try to load a property-file that is here <project>/resource/text/translation_en.properties With the following code
I am copying the select tag from playframework to test out creating tags as
I was looking to try django-directupload in one of my Django projects, but I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.