CSS techniques for positioning h1 and li items...

admin

Administrator
Staff member
Hello!<br />
<br />
First of all: Screw Netscape. Their 4.x releases can't handle any standards properly, so any answer given here is alright as long as it works on MSIE 4.x and above.<br />
<br />
Question 1:<br />
<br />
I'd like to remove the white space below a h1, h2 and h3 tag without removing the block display style. Anyone know how this can be done?<br />
<br />
Question 2:<br />
<br />
I'd like to control the amount of pixels that li tags in both ul and ol get. Anyone know how that can be done?<br />
<br />
/Robert<br />
<br />
Ps. I've, of course, done some trial & terror on the above, but utterly failed to find a solution.<!--content-->in regards to h1, h2 and so forth, I have also tried to remove the extra padding below, but have failed.<br />
<br />
So, I created my own header classes...class="heading1", class="heading2" and so on. this gave me total control...and no space below...<br />
<br />
<br />
<style><br />
.heading1{<br />
line-height:26px;<br />
font-size:24px;<br />
font-weight:bold;<br />
padding-bottom:0%;<br />
}<br />
.heading2{<br />
line-height:22px;<br />
font-size:20px;<br />
font-weight:bold;<br />
padding-bottom:0%;<br />
}<br />
</style><br />
<br />
<br />
as for the li issue, <br />
<br />
i have been able to mess with the positioning to a degree:<br />
<br />
<br />
li.new{<br />
font-size:10px;<br />
border-width : 10px;<br />
letter-spacing : 2px;<br />
margin-left : 2px;<br />
padding-left : 2px;<br />
}<br />
<br />
and then<br />
<br />
<li class="new">something</li><br />
<br />
<br />
john<!--content-->Thank you for the tips!<br />
<br />
Yes, I too have created my own header classes, but my pages are going to be edited by people who never have seen html code ever, so I wanted to keep it simple for them.<br />
<br />
(I am going to use ssi to include their docs in a preformatted table, and styles to apply the design).<br />
<br />
I will try to experiment som more with the li too.<br />
<br />
/Robert<!--content-->I just discovered the solution:<br />
<br />
ul { border-width: 0px; margin-left: 0px; padding-left: 20px; }<br />
li { font-family: Verdana, sans-serif; font-size: 10pt; color: #000000; }<br />
<br />
My mistake was that I never bothered to change the style of the ul tag!<!--content-->I had not thought of it either...nice work...<!--content-->
 
Back
Top