Forum Archive

Go Back   3D Realms Forums > General Topics > Programming Forum
Blogs FAQ Members List Social Groups Calendar Mark Forums Read

Notices

 
 
Thread Tools
Old 03-24-2005, 10:17 AM   #1
AlienAssKicker

AlienAssKicker's Avatar
Stupid little CSS Question.
Hello,

Would anyone know how do I get rid of the white space between my "h1" element and my "h2" element? Same thing between "h2" and "p";

Obviously, my HTML code is something like:

Code:
<h1>Title</h1>
<h2>Description</h2>
<p>Paragraph</p>
I want to avoid having to do tables under HTML so that's why I'm using CSS.
Attached Images
File Type: png 809104-blah.PNG (37.0 KB, 39 views)
AlienAssKicker is offline  
Old 03-24-2005, 10:45 AM   #2
AlienAssKicker

AlienAssKicker's Avatar
Re: Stupid little CSS Question.
Nevermind, I just ended up creating my own tags so that I wouldn't have the deal with the headings settings on h1, h2, h3...

Stilll curious about it though.
AlienAssKicker is offline  
Old 03-24-2005, 03:40 PM   #3
AlienAssKicker

AlienAssKicker's Avatar
Re: Stupid little CSS Question.
Just for the record. To get rid of the line break of a heading or paragraph, simply reset the default margin value.
For instance:

h1 {
background: #ddd;
margin: 0;
}

I stumbled upon this answer to my original question by accident while looking for something else. Of course, I don't need it anymore...

Yay for me.
AlienAssKicker is offline  
Old 03-24-2005, 03:41 PM   #4
AlienAssKicker

AlienAssKicker's Avatar
Thanks
Thank you AAK, you have been very useful today.
AlienAssKicker is offline  
Old 03-24-2005, 07:15 PM   #5
John

John's Avatar
Re: Thanks
You're VERY welcome.
__________________
Duke4.net

Let not mankind bogart love.
[A pessimist is what an optimist defines as a realist.]
John is offline  
Old 03-24-2005, 07:20 PM   #6
Ivan
Re: Thanks
Quote:
AlienAssKicker said:
Thank you AAK, you have been very useful today.
I wonder if my informatic teacher even knows that. He told us that one of his HTML pages took him 50 hours to do. Yeah right.

Yay for you AAK.
Ivan is offline  
Old 03-24-2005, 09:17 PM   #7
ADM

ADM's Avatar
Re: Thanks
Quote:
AlienAssKicker said:
Thank you AAK, you have been very useful today.
Seriously though you have been useful.. I never knew that even.

But mainly because I always avoided preset tags like that.
ADM is offline  
Old 03-25-2005, 06:51 PM   #8
NetNessie

NetNessie's Avatar
Re: Stupid little CSS Question.
Quote:
AlienAssKicker said:
h1 {
background: #ddd;
margin: 0;
}

Doesnt
Code:
h1 {
display: inline;
clear: right;
}
Do the same thing?

(not that it matters, my approach is probably the worlds worst CSS )
__________________
Ink Grass LazyMoon Photography
"Say something wise, and your name will be remembered forever." - Anonymous
NetNessie is offline  
Old 03-25-2005, 09:32 PM   #9
Usurper

Usurper's Avatar
Re: Stupid little CSS Question.
It likely does if you don't apply any additional formatting to the header tag. However, once you get into borders and background colors and such, you may prefer to keep it as a block level element.
__________________
Meadhall of the Comitatus | RTCM
Usurper is offline  
Old 03-26-2005, 05:05 AM   #10
NetNessie

NetNessie's Avatar
Re: Stupid little CSS Question.
Yah, my thoughts exactly.
__________________
Ink Grass LazyMoon Photography
"Say something wise, and your name will be remembered forever." - Anonymous
NetNessie is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 09:23 AM.

Page generated in 0.12914109 seconds (100.00% PHP - 0% MySQL) with 19 queries

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.

Website is 1987-2014 Apogee Software, Ltd.
Ideas and messages posted here become property of Apogee Software Ltd.