I have two CSS classes:
.class1 { height: 100%; width: 300px; border: 1px none #B0B0B0; position: relative; display: inline; left: 10px; } .class2 { height: 100%; width: 200px; position: relative; display: inline; margin-left: 15px; background-color: #00CCCC; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; }
Now, as you can see, both of them should be displayed in a line (there are no line breaks between lines). Which is working correctly. But for some reason, since I set the display to string, Padding, Positioning and Margin CSS have completely stopped working. I can add a left marker 10inches and nothing will happen. The same with padding and positioning.
Can someone explain how to fix this?
In addition, I have a relative position set for both classes, but when viewing a page in a .class2
browser on top of laps .class1
, when it should be right after .class1
.
Any ideas?
EDIT
Ok, so I made a JSFiddle, but it seems to play even more there ....
It seems that Width
not working.
here he is:
http://jsfiddle.net/zYbwh/1/
user849137
source share