Copy link to clipboard
Copied
Hello!
I have an index page (www.BigMusicGeek.com -- Your Online Music Authority! ) that show the first cell of each row as 'sitting' lower that the rest of the cells in the row. Any idea why this would be happening?
Thanks!
You're overusing <h1> tags (you should only have 1 per page) and the browser default padding/margin is causing the extra space in those items where you have two <h1> tags next to each other.
Run the validator at http://validator.w3.org/nu to get a listing of your errors and warnings, that way you can avoid improperly structuring your page before it gets this far..
If you don't want to use browser defaults for margins and padding on your html elements, adding the following at the top of your css wi
...Copy link to clipboard
Copied
You're overusing <h1> tags (you should only have 1 per page) and the browser default padding/margin is causing the extra space in those items where you have two <h1> tags next to each other.
Run the validator at http://validator.w3.org/nu to get a listing of your errors and warnings, that way you can avoid improperly structuring your page before it gets this far..
If you don't want to use browser defaults for margins and padding on your html elements, adding the following at the top of your css will take them out...
* {
padding:0;
margin:0;
}
...you will then need to add them back for items like <p> later in your css file.
Copy link to clipboard
Copied
Awesome.
I appreciate the help!
Thanks!
Copy link to clipboard
Copied
It's common practice to use a Reset CSS stylesheet to avoid browser style inconsistencies.
https://cssreset.com/what-is-a-css-reset/
Most frameworks like Bootstrap have their own built-in Reset CSS (sometimes called Reboot or Normalize).
Reboot, Resets, and Reasoning | CSS-Tricks
The quick & dirty method Jon posted is a little like swatting flies with a sledgehammer. The asterisk effects every HTML element there is even the ones you don't want to effect.
Copy link to clipboard
Copied
It was considered good practice to use a reset style sheet a decade ago. It is one of the most common causes of questions by non-CSS-experts and should be avoided. Instead, make your own small reset rules as needed, by project, until you learn CSS properly, which will also prevent you, in most cases, from relying on someone else's overweight code.
I would narrow Jon's knowledgeable suggestion further to this:
h1, h2, h3, h4, h5 {margin: 0;}
But do take your images out of heading tags, as suggested by Osgood.
Images do not need a containing tag in your situation.
When you get a little more advanced, you can allow paragraphs to use default margins (which, contrary to popular belief, are just fine in most cases), but nip the margins when they are the first paragraphs inside a containing element:
p:first-child {margin-top: 0;}
Copy link to clipboard
Copied
Like most things web-related, Reset CSS comes with lots of differing opinions. Use whatever works best for you & your projects.
Copy link to clipboard
Copied
https://forums.adobe.com/people/Nancy+OShea wrote
Like most things web-related, Reset CSS comes with lots of differing opinions. Use whatever works best for you & your projects.
Sorry, Nancy, but that's terribly misleading. It's similar to steering someone who knows little or nothing about CSS towards Bootstrap. They will have no idea what the reset does, and will spend hours trying to figure out stupid little related issues such as "why is there no space between my paragraphs."
I realize there are varying opinions, but your suggestion is simply inappropriate for a beginner. At least Jon, Osgood, and I are giving little bites and explaining exactly what they do.
You can be wrong every once in a while. It happens to the best of us 🙂
Copy link to clipboard
Copied
The links I posted above tell the story. I don't need to write a book on this.
Copy link to clipboard
Copied
Mamma Mia, here we go again.
If you feel that the trio are providing faultless replies, how about this one?
You're overusing <h1> tags (you should only have 1 per page)
What is wrong with
<body>
<div>
<h1>Whackamoon Legumes!</h1>
</div>
<article>
<h1>The proper use of peanuts</h1>
<h2>How to eat peanuts</h2>
<p>Peanuts can be eaten with salt.</p>
<p>This is an acceptable use of peanuts.</p>
<h3>Superior peanut eating methods</h3>
<p>Peanuts are infinitely better when combined with chocolate.</p>
<p>We recommend this approach for best results</p>
<h2>Incorrect application of peanuts</h2>
<p>Peanuts should not be used to fill parking meters.</p>
<p>They will not be effective in this capacity.</p>
</article>
<article>
<h1>Boiling beans</h1>
<h2>Is boiling beans really worth it?</h2>
<p>Let's be honest, it takes ages.</p>
<p>We advise just buying canned beans instead.</p>
</article>
</body>
which gives this document outline:

As far as a document reset is concerned, ready made resets like Bootstrap's reboot, are mere KB's in size, hardly worth the discussion.
Copy link to clipboard
Copied
Well I guess that's just another subject of debate.......depends who you believe these days, if anyone. As I've said in past posts the whole web-development process is now in complete melt-down. I've never seen it so bad in the 20 years I've been working in it. Developers are just making it up as they go along mostly taking their evangelist followings from what Facebook, Google, Twitter, say - its generally a car crash approach. Talk about brain washing, this is something on a huge scale.
I also agree that using a full-blown css reset is very, very bad practice. You pays your money you takes your choice I guess.
Copy link to clipboard
Copied
Sorry, there is no debate when the facts are there. Have a look at Using HTML sections and outlines - Developer guides | MDN
I'd love to know the difference between a full-blown reset and a partial reset. If it is a matter of bytes then it is not worth a discussion.
Copy link to clipboard
Copied
This tool may help those that are interested in document outlines: HTML5 Outliner - Chrome Web Store
Copy link to clipboard
Copied
BenPleysier wrote
Sorry, there is no debate when the facts are there. Have a look at Using HTML sections and outlines - Developer guides | MDN
I dont even understand that link. Are they infering multiple <h1> headings can be used in html4?
<h1>Forest elephants</h1>
<p>In this section, we discuss the lesser known forest elephants.
...this section continues...
<h2>Habitat</h2>
<p>Forest elephants do not live in trees but among them.
...this subsection continues...
<h2>Diet</h2>
<h1>Mongolian gerbils</h1>
Why would they even suggest that, unless I'm reading it incorrectly?
Yet on this page HTML 5.2: 4.3. Sections they suggest you mark the code up as such: (I dont see any multiple <h1> tags within the <section> tags.
<body>
<h1>Let’s call it a draw(ing surface)</h1>
<section>
<h2>Diving in</h2>
</section>
<section>
<h2>Simple shapes</h2>
</section>
<section>
<h2>Canvas coordinates</h2>
<section>
<h3>Canvas coordinates diagram</h3>
</section>
</section>
<section>
<h2>Paths</h2>
</section>
</body>
Yet on the page you link to this is ok too:
<section>
<h1>Introduction</h1>
<p>In this section, we discuss the lesser known forest elephants.</p>
</section>
<section>
<h1>Habitat</h1>
<p>Forest elephants do not live in trees but among them.</p>
</section>
Also on the page you linked to there is the warning below:
Important: There are no implementations of the proposed outline algorithm in web browsers nor assistive technology; it was never part of a final W3C specification. Therefore the outline algorithm should not be used to convey document structure to users. Authors are advised to use heading rank (h1-h6) to convey document structure.
BenPleysier wrote
I'd love to know the difference between a full-blown reset and a partial reset. If it is a matter of bytes then it is not worth a discussion.
Don't know if you're old enough
to remember Eric Meyers reset - that's the kind of junky re-set I'm refering to. I'm not taking about bytes at all, thats insignificant. It's the approach that is wrong, in my opinion.
Copy link to clipboard
Copied
The structure in HTML 4 was different because there were no sectioning elements as in article, aside, main, nav and section as in HTML 5.
In HTML 4, sectioning was achieved using header tags. That is where the notion of only one H1 was born.
In HTML 5, each sectioning element can have its own H1 tag
Eric Meyers' reset lived in an era where browsers were further apart to what they are now; the differences are gradually disappearing with a lesser need for rests.
Copy link to clipboard
Copied
BenPleysier wrote
The structure in HTML 4 was different because there were no sectioning elements as in article, aside, main, nav and section as in HTML 5.
In HTML 4, sectioning was achieved using header tags. That is where the notion of only one H1 was born.
Yes BUT not as that page was refering to, by using multiple <h1> tags. As far as I know, if its true of course, the use of multiple <h1> tags is only recommended if you use the correct semantic html5 mark-up structure, which html4 didn't support, so why even show an example that is so obviously incorrect?
Further more so that wesbite is so out of date in the examples it provides it's just unbelievable if anyone takes it seriously. Look at the below code example, refering to 2009!!! - see the copyright at the foot of the example: Unbelievable, truely!
<!DOCTYPE HTML>
<HTML><HEAD>
<TITLE>The Ramblings of a Scientist</TITLE>
<BODY>
<h1>The Ramblings of a Scientist</h1>
<MAIN>
<ARTICLE>
<H2>Episode 15</H2>
<VIDEO SRC="/fm/015.ogv" CONTROLS PRELOAD>
<P><A HREF="/fm/015.ogv">Download video</A>.</P>
</VIDEO>
<FOOTER> <!-- footer for article -->
<P>Published <TIME DATETIME="2009-10-21T18:26-07:00">on 2009/10/21 at 6:26pm</TIME></P>
</FOOTER>
</ARTICLE>
<ARTICLE>
<H2>My Favorite Trains</H2>
<P>I love my trains. My favorite train of all time is a Köf.</P>
<P>It is fun to see them pull some coal cars because they look so
dwarfed in comparison.</P>
<FOOTER> <!-- footer for article -->
<P>Published <TIME DATETIME="2009-09-15T14:54-07:00">on 2009/09/15 at 2:54pm</TIME></P>
</FOOTER>
</ARTICLE>
</MAIN>
<FOOTER> <!-- site wide footer -->
<NAV>
<P><A HREF="/credits.html">Credits</A> — <A HREF="/tos.html">Terms of Service</A> — <A HREF="/index.html">Blog Index</A></P>
</NAV>
<P>Copyright © 2009 Gordon Freeman</P>
</FOOTER>
</BODY>
</HTML>
BenPleysier wrote
Eric Meyers' reset lived in an era where browsers were further apart to what they are now; the differences are gradually disappearing with a lesser need for rests.
So why do so many developers still suggest resets are a good workflow as browsers are now more aligned than ever. I mean it might be their opinion, which should be respceted, but I think its just yet another unsubstantiated opinion, much like everything else concerning web-development.
Copy link to clipboard
Copied
I'd love to know the difference between a full-blown reset and a partial reset. If it is a matter of bytes then it is not worth a discussion.
You're not paying attention.
Read my responses to Nancy. Carefully.
Copy link to clipboard
Copied
Balderdash.
Copy link to clipboard
Copied
Well you have the first image in each row that is affected wrapped in an <h1><a>IMAGE</a></h1> tag - the <h1> has a margin applied to it causing the extra depth. The image DOES NOT require being in an <h1></h1> tag as that should be reserved for a 'heading' and should only be used once per page, not multiple times. I suggest you remove the <h1> tag wrapping your images and then use <h3> tags for the headings above the images as these can be used multiple times.
If you use Flexbox for the layout you would not have to concern yourself about such issues as the boxes, regardless of the extent of content in them, will all be the same height.
Copy link to clipboard
Copied
To no one in particular.
Isn't all this about h1, (etc) and css resets a mute point anyway?
Most Dw users do not use html5 semantics to mark-up a page, bootstrap and all other Dw started pages also do not. Plus much of css3 and html5 support is missing from Dw.
As for css resets, who cares?
They are default in the bootstrap css, and 90% of Dw users probably have no idea about what they do, (or why) and probably no longer know if they are required.
Copy link to clipboard
Copied
To everyone who comes here seeking answers...
If your CSS skill levels do not provide the information necessary for you to make your own decision on whether to use a reset, the answer is simple. Don't.
If your CSS skill levels do not allow you to make a clear decision on the merits, or lack of merits, in using Bootstrap, do not allow it to be forced on you.
The bottom line? Learn HTML and CSS to the extent that you can code a page from scratch. Only then will you be able to make a good decision on the merits of using one or more of the free frameworks (such as Bootstrap). Use a framework before you learn to code and I promise you will wind up with problems. In fact, you might not even know you have a problem until it's too late.
Stop accepting fish from Adobe or the "experts" in this forum. Learn to fish yourself. You won't be sorry.
Copy link to clipboard
Copied
Don't know why you replied to me AL, but every one of your points are correct
.
The problem though would not be solved for many, as Dw itself is becomming a joke in the development world. Then again Adobe and the Dw managment can do what they wish, after all, it is their program.
Copy link to clipboard
Copied
pziecina Mar 21, 2019 11:15 AM (in response to Al Sparber)
Don't know why you replied to me AL, but every one of your points are correct .
My bad. I meant to reply to the original post.
Copy link to clipboard
Copied
pziecina wrote
To no one in particular.
Isn't all this about h1, (etc) and css resets a mute point anyway?
Most Dw users do not use html5 semantics to mark-up a page, bootstrap and all other Dw started pages also do not. Plus much of css3 and html5 support is missing from Dw.
I think it's far wider spread than just DW. I get the feeling that a lot working in the industry full-time, who wouldnt be using DW, are just as 'clueless'. This is probably not their fault as things move too fast in the industry in general. This causes greater disparity between developers views. I do find it hard to accept though, in the majority of cases web-developement should be relatively simple, it's those that follow the nurd developers, who don't even built general websites for a living, that make it harder for themselves.
pziecina wrote
As for css resets, who cares?
Probably why I dont bother but I don't bother will a lot of stuff - Bootstrap, Sass, Build Tools, pretty pointless workflows for most developers who just toss out your average website which accounts for the majority. I guess if it makes them feel loved there is no great harm to anyone else, only to their own mental health.
Copy link to clipboard
Copied
pziecina wrote
Isn't all this about h1, (etc) and css resets a mute point anyway?
It may be for some.
pziecina wrote
Most Dw users do not use html5 semantics to mark-up a page, bootstrap and all other Dw started pages also do not. Plus much of css3 and html5 support is missing from Dw.
In that case most(?) users miss out on the beauty of HTML5. The fact(?) that much support is missing in Dreamweaver is not an excuse not to use CSS3.and HTML5.
pziecina wrote
As for css resets, who cares?
They are default in the bootstrap css, and 90% of Dw users probably have no idea about what they do, (or why) and probably no longer know if they are required.
Pardon me, I care about resets and so should every web developer. As an example, here is some content shown in different browsers.

After adding a 5KB file, I get the the following result:

CSS resets? Who cares?
Edit: My bad, the file is 4KB not 5KB.
Copy link to clipboard
Copied
its okay everybody makes mistakes
Find more inspiration, events, and resources on the new Adobe Community
Explore Now