View Full Version : headers without vertical space and other questions

10-01-2004, 11:47 PM
I'll ask a few questions instead of opening a new topic on each one of them (if is prefered not to do it this way, just let me know)

1. when I use an <Hn> tag (n being 1-6) it always puts a vertical space on top and below that text, what I want to know is if there is a way so that I can eliminate that spacing or a way to decreasing it?

2. when I have a paragraph with some justified text and I then add a list of any kind (ol/ul) to it, that list won't follow the justified class, the only way I can find is to put that list into a <div> tag inside or outside the <p> tags. So is there another way to do it, a less complicated or cleaner way?

3. what are all the possible styles for the <li>s ? like list-style-image or list-style-position.

4. what is the equivalent of the font size 12 px into em, because when I use em the font becomes huge.

5. why do some people when they use some tags they add this at the bottom of it: html>body ..... and how does that work exactly?

10-01-2004, 11:54 PM
1. margin: -npx; padding: 0; (eliminates space, not the line break; n = any number)
2. <ul> cannot take the properties of a paragraph, enclose both in a <div>
3. list-style-image, list-style-position, list-style-type
4. depends on the previous element (I think) since "em" is a relative unit
5. allows authors to further increase the specificity for applying styles (">" represents "is a direct parent element of"), not sure why "html body" wouldn't work

Have fun

10-03-2004, 09:01 AM

btw, if ems are relative, than how exactly should I use them so that my visitors are able to modify the text size, meaning, if ems are relative do I have to set a body text default in px and all the other text in ems will be relatively sized with the default text as reference?
I dont get this :confused:

10-03-2004, 02:21 PM
an EM is defined as the width of a captial letter M in the current font size, hence for general purposes a size of 1em is preffered. You can then use percentages to scale this up or down fopr each parent or child element.

html>body means 'a body tag that is the direct descendant of an html tag' IE doesnt support the > selector so any html>body rules will not be followed by IE.

http://www.blooberry.com/indexdot/css/index.html is a comprehensive list of CSS properties and support for them, you will find the information list styles in there.

10-03-2004, 02:53 PM
:D thanks
you are really good at explaining stuff btw