Forum Moderators: open

Message Too Old, No Replies

Why is my second heading indented?

my second heading in html is being indented

         

newbie

9:33 pm on Jun 5, 2008 (gmt 0)

10+ Year Member



like I said before....the second heading on my page (bye the way, as my name suggests, I am a newbie. please correct me if I am posting in an inappropriate spot or violating some other rules=) is indenting and I don't like it! how do i keep the second heading from indenting?

surrealillusions

10:37 am on Jun 6, 2008 (gmt 0)

10+ Year Member



Some code would be helpful so we can pinpoint any problem (but no urls as per the tos).

;)

rocknbil

6:35 pm on Jun 6, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome aboard newbie!

Have you tried stripping the heading to an empty document, then adding items by trial and error? It's probably one of the surrounding elements, there should be no indent on a head other than it's default margin/padding. Very possible it's a missing closing <ul>/<ol> tag, or a head nested in a <ul>:

<ul>
<li>List one</li>
<li>List two</li>
<h3>I think I'm part of the previous list</<h3>

Or something "like" that, with an adjacent element pushing it out of place. If it's not that, remove the margins/padding on the head:

<style type="text/css">
h3 { margin:0; padding:0; }
</style>

newbie

7:52 pm on Jun 6, 2008 (gmt 0)

10+ Year Member


Thanks so much for the reposes. I figured it out...
it was:

<h1>header<h1/>
<blockquote>
<p>words and stuff<p/>
<blockquote/>
<h2>header2<h2/>

I removed the <blockquote> and the problem went away.
is this a normal issue? should I not be using blockquotes as a rule. Perhaps I am misunderstanding the proper usage.
thanks again

SuzyUK

7:59 pm on Jun 6, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<blockquote/>

you should be able to use that, however you've closed it wrong, so I presume the error handling thought it wasn't closed

should be:

</blockquote>

newbie

8:02 pm on Jun 6, 2008 (gmt 0)

10+ Year Member



Got it. Thanks=)

tedster

8:37 pm on Jun 6, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



By default the blockquote element does get indented on most browsers. You can use CSS to set up whatever margin you want on the left side for the blockquote element - but by default, it usually will be indented.

Also it's best only to use blockquote for a real quote - not just to get the indentation effect. In the earlier days, when even basic CSS support was so buggy in many browsers, a lot of people got in the habit of using blockquote just to get the margin-left. But it's much better to use the element in the context of its correct semantic meaning.