Noob Question - Center Tags

6 replies
  • WEB DESIGN
  • |
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
#center #noob #question #tags
  • Profile picture of the author JRecard
    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
    {{ DiscussionBoard.errors[1504611].message }}
  • Profile picture of the author tuanng
    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;"
    Signature

    Need 3D ebook covers right NOW? Make your own at myecovermaker.com

    {{ DiscussionBoard.errors[1504620].message }}
  • Profile picture of the author JRecard
    Legend - Thank You
    {{ DiscussionBoard.errors[1504657].message }}
  • Profile picture of the author Technista
    Originally Posted by JRecard View Post

    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.
    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
    {{ DiscussionBoard.errors[1506665].message }}
    • Profile picture of the author eibhlin
      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!
      Signature
      Artist, blogger, and author of a bazillion books, more or less. Find me at Eibhlin.com
      {{ DiscussionBoard.errors[1506693].message }}
  • Profile picture of the author JRecard
    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
    {{ DiscussionBoard.errors[1517409].message }}

Trending Topics