ameerulislam — 2013-01-06T12:12:07-05:00 — #1
jppv.net is the place where I'm working on, It's a responsive theme and when I the screen is scales down the screen size to 719px (max) my menu layout changes but an extra 20 odd pixel space is being added and I can't get rid of it. see the attached image.
paulob — 2013-01-06T14:52:12-05:00 — #2
I'm not sure if this is what you mean but the 20px purple backgrond beneath the nav is caused by the 20px padding on the parent #header_margin and can't be removed with a negative margin on an inner element.
You just need to do this:
Unless you meant something else of course
ameerulislam — 2013-01-06T21:57:05-05:00 — #3
Boss now new problem arose. the menu bar gets extra margin/padding from the left.
paulob — 2013-01-07T04:55:51-05:00 — #4
You didn't add the code I gave you but instead added an invalid rule before the margin rule in the media query causing it to be missed.
line 1631 style.css
You added this:
It should be this:
There should be no semi-colon at the end. Otherwise it makes the following rule unmatchable.
It shuld be:
ameerulislam — 2013-01-07T05:07:44-05:00 — #5
I love you man.. Your awesome!! I thought every statements should end with ; . can you guide me, when not to use semi-colons ?
paulob — 2013-01-07T05:19:05-05:00 — #6
Your mistake was adding the semi-colon outside the closing bracket thus effectively beginning a new rule
Regarding semi-colons then a semi-colon means that there are more rules to follow. The last rule (or a single rule) doesn't need them but does no harm either way.
e.g. All the following are valid:
As a rule of thumb I usually leave the trailing semi-colun from single rules:
But I always add it at the end in multiple rules.
It's up to you. It's probably safer to tell people to always add it but in the end its just personal preference and saves a few bytes if you omit it.
ameerulislam — 2013-01-07T05:24:26-05:00 — #7
oh... silly mee..:rofl:
guess I'm used to seeing this format (in multiple lines)
where actually this is the same thins as
All good now.. Thanks Again.
paulob — 2013-01-07T05:31:54-05:00 — #8
Its just a preference of mine to put single rules on their own line and save 3 separate lines of code in the stylesheet. In a large stylesheet it soon mounts up and you have to keep scrolling forever to read the stylesheet. I usually only do this with single rules and then revert to the usual format for multiple rules.
ameerulislam — 2013-01-07T05:44:30-05:00 — #9
you know what, I think I'm going to like this. As this will enable me to understand other people's codes. And not get bluffed when I see a different rule like now.
For single rules your one and the regular rules using multiple lines.
by the way this is valid too right? One Line!!
kohoutek — 2013-01-07T05:48:49-05:00 — #10
That's valid as well. In fact, you could write all your styles on a single line. Not that that would be a practical idea, at least not in pre-production mode, but it'd be perfectly valid.
ameerulislam — 2013-01-07T05:54:49-05:00 — #11
Thanks.. There should be a thanks button in sitepoint!!