Member Offer
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

please help, simple HTML problem

Discussion in 'Website Design Forum:' started by luizarios, Dec 6, 2011.

  1. luizarios

    luizarios Junior Member

    Hi, I am coding this page:

    Untitled Document

    The main page has a header (h3) which I wanted to bring close to the top but for some reason if I change the CSS to H3{margin-top:-20px;} then the whole <div> move (I just want the header to come up), please advise what am I doing wrong?

  2. graphicscove

    graphicscove Member

    I can't see what's causing the problem in Firebug but your whole div structure is a little rough. If I were you, instead of adding a ridiculous 340px margin to the left of the 'products' div to get it over to the right, just create a 'container' div filled with the 'menu' div to float left and the 'products' div to float right. That should make things look a little better and would probably sort out your issue.
  3. Jazajay

    Jazajay Active Member

    The divs not actually moving from what I can see the h3 is but the h3 has a massive height to it and the text is at the bottom. It should be a h1 anyway so switch it to that and try removing the padding from the top.

    Also can't you use CSS 3 fonts to accomplish that as that is a lot of code in the h3 tag, which again may be where the cause is?

    Alternativly a hack around it would be to give it a position of relative and then move the top attribute up by 30px.


  4. luizarios

    luizarios Junior Member

    hello, it doesn't matter if it's h1 or h3, I always get the same problem, but I decided to take Graphics Hove advise and float it right and it works :) thanks
  5. graphicscove

    graphicscove Member

    No problem, glad it worked out for you :)
  6. Paul Murray

    Paul Murray Moderator Staff Member

    I think Jazajay means from a semantics/SEO perspective, it should be a H1 tag.
  7. Jazajay

    Jazajay Active Member

    I mean from an everything point of view actually, but I suppose if you just want to pick one that'll do. :D

Share This Page