Forum Moderators: not2easy
I recently posted something here with an URL. Of course my intentions are not marketing or promoting the site, it was merely for CSS questions. I got an email from the regulator telling me not to do this, which I understand completely, of course. But what is the alternative. What do you guys do if you want someone to look at a bit of code, or a web site? What if you want to post it on your own server?
Any suggestions?
For instance I often use these style codes...
{quote followed by code}
This is useful for a code extract.
The quote tags mean that it will appear in a box.
{quote followed by pre}
This text will appear also in a box and it is useful
for longer code extracts as the pre tag seem to use
a slightly smaller font.
how would i demonstratet that one? the entire layout shifts on pages that have more content on it...
the only way of explaining that was to post a URL that I had on my server...
therefore, what does one do in cases where just snippets of code are not enough?
Just keep removing sections until you end up with smallest bit of html that can demostrate the problem (this process actually often helps people to isolate and identify the problem in the first place).
"Simplify, simplify, simplify" as Henry David Thoreau is credited with saying.
If you still have an issue then post the code extract.
the entire layout shifts
And even if the problem affects your entire layout, it is still only one problem. If you have bits and pieces all over that would cause the layout to shift and misbehave -- then you would be left with no solution but to start over ;)
grahamstewart's suggestion to remove bits and pieces of your code until you're left with only what's causing the problem is really the answer. Sounds too cumbersome? Well, that's what anyone who would attempt to help you solve the problem would have to do too! This way you may discover the problem yourself... and if you don't, at least you have done the main work (and rightly so).
Another approach is to remove everything you're 100% is not affecting the problem. However, this is a much riskier approach since you may indeed remove something that was useful to the solution.
Just keep removing sections until you end up with smallest bit of html that can demostrate the problem (this process actually often helps people to isolate and identify the problem in the first place).
That's great advice - divide and conquer! :) It usually solves any problems for me - it is easier to see the problem when you only have three or four lines of code to focus on.
I've also found that every time I do it I find something in my CSS or Html that is superfluous.