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

  • Home
  • SEARCH
  • 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 9003783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:45:19+00:00 2026-06-16T00:45:19+00:00

I have a simple warning message: HTML <span id=j_idt68 class=aviso> <a href=MEU LINK>message</a></span>​ CSS

  • 0

I have a simple warning message:

HTML

<span id="j_idt68" class="aviso">
<a href="MEU LINK">message</a></span>​

CSS

span.aviso a {
    padding:20px 35px;
    background: rgb(255, 174, 174);
    background: rgba(255, 174, 174, 0.3);
    border:1px solid #FF1C1C;                 
    border-radius:10px;
    color:#FF0000; 
    text-align: center;
    opacity:1;
    margin:0 auto;
    font-size:14px;
    display:block;
}​

I declared the width of the span to be 960px because I want the message to be centered but I don’t want the rounded rectangle site to be 960px, I would like it to adjust it’s width according to the size of the text

  • 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-16T00:45:20+00:00Added an answer on June 16, 2026 at 12:45 am

    The a element isn’t inheriting the width; instead, you are setting display: block on it, making its width the entire available width. You need to separate the settings so that the span aligns text lines inside it and the a element is inline-block (or defaulted to inline, but then you have line height problems). Like this:

    span.aviso { 
        display: block;
        width: 960px; 
        text-align: center;
    }
    span.aviso a {
        padding: 20px 35px;
        background: rgb(255, 174, 174);
        background: rgba(255, 174, 174, 0.3);
        border:1px solid #FF1C1C;                 
        border-radius:10px;
        color:#FF0000; 
        opacity:1;
        display: inline-block;
        font-size: 14px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have simple class with width and height member fields which define number of
I have a simple class that I want to use to show a Dialog
I have a simple setup with class Container { Handler h; } All the
I have the warning message given in the title. I would like to understand
I have a relatively simple Backbone handled message container. I can add messages, and
My question is simple: How do i hide the warning message below so that
I have a bit of sample code that is throwing this warning: main.c: In
i have something like: #!/usr/bin/perl use strict; use warnings; use CGI::Simple; use DBI; my
I have simple table in Sybase -- Creating table 'SimpleText' CREATE TABLE [dbo].[SimpleText] (
I have simple php validation form that is halfway working. If you leave the

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.