 |

01-30-2004, 02:49 PM
|
 |
WebProWorld Member
|
|
Join Date: Aug 2003
Location: Pennsylvania, USA
Posts: 64
|
|
CSS style sheets and H1 tags
Well, I've reached a standstill (oh poor me...:o)LOL
But actually I need some pointers, I've been working frantically on my site getting ready to do monthly submissions. Here's my problem, I've already got the css stylesheet, but no H1 tags, how does one go about adding or changing this and where are the proper lines place on the HTML and stylesheet without changing the look of the page? I've tried doing some research and reading on the subject, but it seems very vauge and it hasn't as yet started to 'compute'! Any help would be wonderful!
|

01-30-2004, 03:05 PM
|
 |
WebProWorld Veteran
|
|
Join Date: Jul 2003
Location: Colorado
Posts: 380
|
|
If you already have your css file defined, you should be able to add the new style for H1 at the end of the style sheet. A small basic example:
h1 {
font-family: "Courier New", Courier, mono;
font-size: 16px;
font-weight: bold;
}
This simply redefines the H1 html tag using the css sheet.
Then, all <H1> tags should default to the redefined H1 css style.
The other option is to create a custom class, such as .heading1 It would look similar only:
.heading1
{
font-family: "Courier New", Courier, mono;
font-size: 16px;
font-weight: bold;
}
Then in your html code, any place you want the style applied to the H1 tag, you should be able to use:
<H1 class="heading1">Text goes here</H1>
I am still relatively new to css, so I hope I am sending you in the right direction. You can test it on a sample html and css file to avoid modification to your entire site.
|

01-31-2004, 09:02 AM
|
 |
WebProWorld Member
|
|
Join Date: Aug 2003
Location: Pennsylvania, USA
Posts: 64
|
|
southplatte,
Thanks so much for your reply! I've tried numerous times, but I can't seem to get it working. I'll keep plugging along. I'm using Verdana font, if that makes any difference!
|

01-31-2004, 09:54 AM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: UK
Posts: 2,803
|
|
Hi there computers,
Say if you wanted the <h1> tag to be the red header that you have on your newsletter page, you would simply add the following to your textstyle.css file
h1 {background-color:#FFFFFF; font-family:Verdana; font-size:18px; font-weight:bold; color:#CC0000; text-align:center;}
Then in your page's code you would have the following:
<h1>Has Your Browser Been Hijacked?</h1>
this would achieve the same effect as all those
, <font> and <span> tags put together! :o) Obviously it's up to you to define which headers will have which styles.. working through h1, h2, h3 etc.
By the way, I would put all your current styles into just the one CSS file for ease of maintenance. Currently you're mixing inline styles with an external CSS. You also have a local file referenced from an E:Drive! Eeek!
Any further help, just post back here or PM me if you wish.
Cheers,
Paul
|

01-31-2004, 11:06 AM
|
 |
WebProWorld Member
|
|
Join Date: Aug 2003
Location: Pennsylvania, USA
Posts: 64
|
|
paulhiles,
Thanks for your help! I've found the E:drive reference you mentioned and have removed it, but not on all pages as yet. I have no idea where that came from! I really don't know much of anything about css textstyle, and don't have any idea where to start changing all over to it. Also I haven't had any luck with H1. It always changes the font size, even though I've adjusted it in the css textstyle. So for now I think I may just leave that alone and work on learning more about it in the comming month. Thanks again!
|

02-01-2004, 02:39 AM
|
 |
WebProWorld Veteran
|
|
Join Date: Jul 2003
Location: Colorado
Posts: 380
|
|
Some good resources for css:
http://wdlv.com -- web developers virtual library
http://www.w3schools.com -- another good source for just about anything web/programming related
best of luck --
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|