Block Tags Auto Spacing

Hello All! Nice forum you have here! <br />
<br />
My problem is that I want to elimate the spacing between two block tags. My code looks like this:<br />
<br />
> begin code <<br />
> <br />
> <h1>Welcome to my Website</h1><br />
> <br />
> <h1 class=topmenu>This is the menu under H1</h1><br />
><br />
> end code <<br />
<br />
The space between the first H1 and the second H1 is what I need to elimate. Any ideas? I am using Style Sheets in that helps anyone. <br />
<br />
Thanks!<br />
<br />
Aaron<!--content-->you could try setting the line height in your css, or put them in a table cell with a fixed height<!--content-->Give the first header an id.<br />
<h1 id="welcome">Welcome to my Website</h1><br />
Then use this CSS:<br />
<br />
#welcome { margin-bottom: 0px;<br />
padding-bottom: 0px; }<br />
<br />
.topmenu { margin-top: 0px;<br />
padding-top: 0px; }<br />
<br />
Now some advice on structure. <h1>, <h2>, and so forth are used to provide a structure to the page, like an outline. <h1> denotes the top level of headings, usually the title. <h2> would then denote the subheadings. <h3> is a subheading under <h2> and so on. They should not be used just to make text bigger. You can use CSS to change the text size if you want to make the headings the same size, but make sure you have a usable outline.<br />
<br />
The other thing I would recommend is to use classes when you need to apply the attributes to more than one element on a page. If an element is unique like the topmenu, it should have an id, not a class. Obviously, it works either way, it is just a matter of good coding.<br />
<br />
Doog Xela<!--content-->{deleted by author}<!--content-->
 
Back
Top