help with css for a newbie

This is a discussion on "help with css for a newbie" within the Web Page Design section. This forum, and the thread "help with css for a newbie are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jan 29th, 2006, 11:37
Up'n'Coming Member
Join Date: Jan 2006
Location: Belfast
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
Smile help with css for a newbie

Hi,

I have only just started learning css, having solely used html previously. I have created an external css sheet with the following:

h1
{color: white; text-align: left; font-size: 12pt; background-color: #666666;
font-family: Verdana}
h2
{color: white; text-align: left; font-size: 10pt; background-color: #999999;
font-family: Verdana; font-weight: bold}

Only really basic! And then on my web page, I want two seperate rows within a table:

<tr>
<td height="0"> <h1>Line1</h1></td>
</tr>
<tr>
<td height="0"> <h2>Line2</h2></td>
</tr>
</table>

The only thing is when it displays the page - there is a large gap between line1 and line2 which I can't get rid of!! Any ideas? (sorry for the long post!)
Reply With Quote

  #2 (permalink)  
Old Jan 29th, 2006, 15:49
SuperMember

SuperMember
Join Date: Aug 2003
Location: Castle Rock, CO
Age: 36
Posts: 163
Thanks: 0
Thanked 0 Times in 0 Posts
Re: help with css for a newbie

Add
HTML: Select all
margin: 0
to your header tags so that you have
HTML: Select all
h1
{color: white; text-align: left; font-size: 12pt; background-color: #666;
font-family: Verdana; margin: 0px}
h2
{color: white; text-align: left; font-size: 10pt; background-color: #999;
font-family: Verdana; font-weight: bold; margin:0px;}
I also change #666666 to #666, these colors can be simplified somewhat.

You can change the margins as needed, but the H1 tags were made to have extra margins / padding in HTML to break up the web page.
Reply With Quote
  #3 (permalink)  
Old Jan 29th, 2006, 16:24
Up'n'Coming Member
Join Date: Jan 2006
Location: Belfast
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up Re: help with css for a newbie

Thanks ever so much for that! Works perfectly!
Reply With Quote
Reply

Tags
help, css, newbie

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hello everyone! Another newbie here. Joker Introduce Yourself 6 Aug 19th, 2007 20:52
Newbie VasanthMuthu Introduce Yourself 2 Feb 6th, 2007 17:25
newbie Janna122003 Introduce Yourself 7 Feb 6th, 2007 17:21
Hi newbie to all! Brooksy Introduce Yourself 3 Dec 7th, 2006 22:24
Newbie toefunky Introduce Yourself 6 Nov 19th, 2006 05:54


All times are GMT. The time now is 02:50.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43