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 7171421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:24:40+00:00 2026-05-28T15:24:40+00:00

I needed to make a second border without using images so my idea was

  • 0

I needed to make a second border without using images so my idea was to make another div inside the parent one ex:

<div class="box news">
    <div class="title">{l_news}</div>
    <marquee behavior="scroll" direction="left" loop="-1" scrollamount="3" scrolldelay="0">{news}</marquee>
    <div class="border"></div>
</div>

My css is:

.box{
    float: left;
    position: relative;
    margin: 15px;
    border-radius: 4px;
    -webkit-border-radius: 4px;
    border: 2px solid #9a9a9a;
}
.box div.title{
    clear: left;
    width: 100%-10px;
    height: 22px;
    padding-top: 2px;
}
.border{
    width: 100%-2px;
    position: absolute;
    top: 0px; left: 0px;
    border-radius: 2px;
    -webkit-border-radius: 2px;
    border: 1px solid #d6d6d6;
}

The width: 100%-10px worked the first time but not the second time. Why? Any suggestions for a way around that>

  • 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-05-28T15:24:41+00:00Added an answer on May 28, 2026 at 3:24 pm

    You can’t do calculations like this in CSS. The only reason why the first rule worked is because the browser encounters a syntax error, and reverts back to the default setting.
    A div element’s default behaviour is to stretch to the fullest available width.

    For the title div I would recommend giving .box a padding: 10px.

    I’m not 100% clear how you want the border but I think you should be able to work with left: 2px; right: 2px; top: 2px; bottom: 2px or a variation of it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What is needed to make String.IsNullOrEmpty() count whitespace strings as empty? Eg. I want
Is good knowledge of PHP needed to make an installable template for CMS like
I have come across a Silverlight project that needed to make use of a
What's needed to succesfully make a crossdomain call from Silverlight?
I want a two-column div layout, where each one can have variable width e.g.
Given the following XML: <cfsavecontent variable=xml> <root> <parent> <child>I'm the first</child> <child>Second</child> <child>3rd</child> </parent>
In an OO component, when you have only one implementation available for an class
Last week I needed to test some different algorithmic functions and to make it
Needed Finfo but deleted msi package, so uninstalled php 5.3.0, downloaded 5.3.2 and installed.
I needed some simple string encryption, so I wrote the following code (with a

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.