Viewing 10 replies - 1 through 10 (of 10 total)
  • See the “Border Demo” here:

    https://developer.mozilla.org/en-US/docs/Web/CSS/border

    To make that work as you wish, I believe you will need to add the CSS and some margin settings elsewhere to be applied to the targeted widget (element). As a crude, off-the-cuff example here, that might look ultimately look something like this:

    .textwidget text {margin: 3px auto; border: 14px red dashed;}

    Thread Starter Justine007

    (@justine007)

    Thanks, let ne check it.

    Sharing the URL in question would receive a better community response, since class names can vary from one theme to the next.

    Thread Starter Justine007

    (@justine007)

    https://ordinary.net46.net/wordpress/

    Actually I want the following effect to text widget, below is used in html
    <div style="background-color: #ebeb3d; padding: 5px; margin: 10px; border:3px solid #CC0000;"><div style="border: 1px dashed red; padding: 5px; margin: 5px;">

    To acheive this I used following css

    .widget_text {
    background-color: #ebeb3d;
    border: 3px solid #CC0000;
    margin: 10px;
    padding: 5px;
    border: 1px dashed red; padding: 5px; margin: 5px;
    }

    But dont get the full effect.

    below is the result when using in html posts

    https://s28.postimg.org/5uf8u8arh/image.jpg

    No great harm is being done here, but your second border over-rides the first:

    border: 3px solid #CC0000;
    border: 1px dashed red; padding: 5px; margin: 5px;

    Thread Starter Justine007

    (@justine007)

    How to put that two boarders using css?

    You will have to identify the individual components or parts so you can give each its own border.

    It looks to me like you have code coming from a variety of sources/edits, so I would begin by searching your style sheets for ‘widget’ and then doing some overall consolidating at your Child Theme (assuming the parent files have *not* been edited) before trying to add more changes.

    Thread Starter Justine007

    (@justine007)

    Sorry English is not my native language, I cant follow you, Do you need any information from me? I am using plugins like amr short code any widget, column short code etc

    I think you might have many edits already. All edits should only be in a Child Theme.

    Putting a solid border around a widget is one thing to do, then adding a dashed border around the text is something different to do.

    Thread Starter Justine007

    (@justine007)

    Yes I am doing all edits in child theme.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to put a dashed boarder line in text widget’ is closed to new replies.