Welcome to WebmasterWorld Guest from 54.145.136.73

Forum Moderators: incrediBILL

<h1></h1> tags

   
12:33 pm on Dec 25, 2005 (gmt 0)

5+ Year Member



Now all the titles of articles on my site have the following properties: font: bold 27px 'Tahoma'; color: #2A2A92. How can I insert the titles of these pages between <h1></h1> tags so that the properties described above do not change? The fragment of html-code to modify:

<style type="text/css">

<!--

.ts1 {font: bold 27px 'Tahoma'; color: #2A2A92}

-->

</style>

<span class="ts1">The title of the article</span>

Can you explain me what to do?

12:49 pm on Dec 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Something like this, maybe?


h1 {
margin:0;
padding:0;
font:bold 27px tahoma,verdana,sans-serif;
color:#2a2a92;
}

<h1>The title of the article</h1>

2:33 pm on Dec 25, 2005 (gmt 0)

10+ Year Member



Why specify margin and padding as 0 for a <h1>?
4:03 pm on Dec 25, 2005 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



In the above example, you can also just replace span with h1:

<h1 class="ts1">The title of the article</h1>

If you don't want the line break at all, then add display:inline to the rules.

Why specify margin and padding as 0 for a <h1>?

I often do that (well, I usually prefer a 4px margin) to avoid the sizeable gap between the header and the body copy. It gives a certain look that I prefer on many pages, visually associating the head and the copy more closely. This also makes for a bit more content above the fold.

4:42 pm on Dec 25, 2005 (gmt 0)

10+ Year Member



tedster, OK. FWIW, I am using

margin-top: 0;
margin-bottom: 0;
margin-left: .5em;

mostly at the moment - suits a lot of stuff I do right now. I just wondered if your settings had to do with an IE quirks thing that I didn't know about.

Happy Christmas to you.

7:32 am on Dec 26, 2005 (gmt 0)

5+ Year Member



Thank you. Now how can I replace
<span class="ts1">The title of the article</span>
with
<h1>The title of the article</h1>
in DW for all pages on my site? Keep in mind that the articles' titles are different on different pages.
3:43 pm on Dec 26, 2005 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



How about doing it in two steps -- one batch replace for all the opening tags and then on for all the closing tags.
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month