0

Here is my fiddle:

https://jsfiddle.net/2msz53n9/

And here is the problem:

* {
margin:0;
padding:0;
overflow:hidden
}

I need to use this for the rest of my site. So I cannot remove it. However, on my fiddle, I want the border to show also on the right, but now because of the above, it doesn't. I would like to have a solution where I can keep the above code, however, if not, I will have to review my whole site and re-do the CSS, I guess. I haven't been able to get the border on the right without removing that wildcard code though. Anyone?

Hardist
  • 2,375
  • 10
  • 42
  • 79

2 Answers2

2

You can add box-sizing:border-box; to your list of wildcard rules:

* {
    margin:0;
    padding:0;
    overflow:hidden;
    box-sizing:border-box;
}

jsFiddle example

Bootstrap actually does this and you can read more here.

Community
  • 1
  • 1
j08691
  • 197,815
  • 30
  • 248
  • 265
1

The actual width of .rightcont is 328px including 1px border on left and right.

So either increase width of .right to 328

Or add box-sizing: border-box; to .rightcont

Felix A J
  • 6,114
  • 2
  • 25
  • 41
  • I seriously checked and tested that before and I didn't get it to work. Now, it works with the width change though. Thanks :) – Hardist Jul 15 '15 at 17:55