Problem with width and margin.
-
Hey’all.
I’m a 18 year old graphic designer, so i’m not that good with codes.
But like 2 weeks ago i decided to go and make my own wordpress theme for my Freelance graphic design business. and it goes better than expected.
But there is one thing i walk into;
I try to make it responsive, well it works, but kinda weird:
I’m trying to make my menu and page content a width of 60/70%
This is how the menu css looks now
/* Menu */ #menu { width: 60% center; height: auto; padding-left: 0; margin: 0 15% 0 15%; background: #101010; align-content: center; }But somehow it ignore’s the width, (when i “inspect element” it is strikedtrough.
But there is no other place where the width is defined.So i added a 15% on both sides to make it 70%
And that does the trick. but i’m wondering why it takes the margin over the width?
The topic ‘Problem with width and margin.’ is closed to new replies.