CSS: adjust box width with margins? -
I have a box whose width is variable because it depends on the size of the container There is no content in the box, Therefore it is using margins to define relatively width but it is not working. This is my code:
.box {background: url ("back.jpg") No-repeat scrolls 0 / transparent cover; Border: 4px solid black; Box-Shadow: 0 0 5px # 826200; Profile: 3px solid white; Hidden flurry; }. Box: {content: ""; Border-top: 2px solid red; Margin: -20 px 0 7px -7px; Status: Completed; Width: Auto; } This is my baby
Please note that the red border goes outside the box without the respect of the right margin, and if I set the width to auto If the red border is not displayed at all, is it possible to solve it using CSS only?
Thank you.
I looked at Bela and saw that the top red border was not visible.
There was a line with padding: 0 100%; Removing that line fixes your problem.
Did you want this final result?
.box {background: url ("back .jpg") No-double scrolling 0 / transparent cover; Border: 4px solid black; Box-Shadow: 0 0 5px # 826200; Profile: 3px solid white; Hidden flurry; } .box: first {border-top: 2px solid white; material: ""; Margin: -9 pixels 0 7px -7px; Status: Completed; Width: Auto; }
Comments
Post a Comment