Noob Question - Center Tags

by 6 replies
7
I am trying to center headlines midway down a sales letter - I removed all <H> tags because they kept on automatically bold-ing the font and the font I was using - Impact - is god awful when in bold.

So I removed the <H> tags and just centered the font and changed it manually. Everything comes up good (Color change, font change) but it won't center in the browser.

So I opened it in dreamweaver - and tried to center it that way. It showed up as being centered - but once again, when I uploaded it to the webpage it was left aligned.

I am slightly confused with the use of <p style> and <span style>

But the code I am using to center the sub-headlines is:

<span style="font-family: Impact; font-size: 36px; text-align: center; color: #C00;"></span>

I am missing something obvious here?
Thanks
JR
#website design #center #noob #question #tags
  • Nevermind... I am such a retard.

    It occured to me once I had typed out this thread that it might be a good idea to actually try out <p style> tags.. which worked fine.

    I guess typing it out made me think through it clearly. Blame it on late night...

    Can anyone care to explain to me why it worked with <p style> tags instead of <span style>

    Like I said - I am pretty new so it is slowly clicking

    Thanks
  • by default, <p> has a a display set to 'block' - so it takes up the entire row follow by forced new lines.

    when you use <span> it is by default displayed as flushed left, to have the span behave like the <p> tag, add to the style "display:block;"
    • [ 1 ] Thanks
  • Legend - Thank You
  • I know you have found a workaround, but here is a suggestion for keeping your <H> tags in your document without bolding your font. Using CSS: style="font-weight: normal;" within the tag works like a charm.

    T
    • [1] reply
    • I'd like to add that you did exactly the right thing: Trial and error is a great way to learn HTML and webpage design!

      Though it can be a tedious process, you're on the right track. Good for you!

      Programs like Dreamweaver (and the free program, Nvu) are handy, but it's best if you can also visually check the code when something doesn't look right.

      When I'm working with someone who's new and having code problems, I usually recommend Nvu. Though Dreamweaver is a more complete program, it can (sometimes) add "helpful" code that you didn't want.

      If you can visually scan the HTML (etc.) yourself and find the problems, that's a real plus.

      You're doing great... continue!
  • Thanks guys All the help is awesome - and this forum is amazing.

    Yeah I am pretty much just learning the code now by myself. Time consuming - but way better and things work more often AND I understand what is going on

    Nvu was the problem to start with - too many bugs.

    Dreamweaver is great for trying code and seeing if it worked or not, without having to upload the new changes to the hosting every time (not hard, but still) So it's great for learning -- and it color codes everything, which Nvu doesn't.

    Although I am just using typepad now

    And Technista... I didn't eventually work that out Haha. Thank you though, very helpful.

    Learning HTML isn't as bad as I thought it would be - I was daunted at first, but I just got stuck in a its all coming together now.

    Thanks for the help and support guys -- This forum is insane

Next Topics on Trending Feed

  • 7

    I am trying to center headlines midway down a sales letter - I removed all <H> tags because they kept on automatically bold-ing the font and the font I was using - Impact - is god awful when in bold. So I removed the <H> tags and just centered the font and changed it manually. Everything comes up good (Color change, font change) but it won't center in the browser.