• 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


luizarios

Junior Member
#1
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?

Thanks
 
#2
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.
 

Jazajay

Active Member
#3
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.

So:

position:relative;top:-30px
 

luizarios

Junior Member
#4
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
 

Paul Murray

Moderator
Staff member
#6
luizarios said:
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
I think Jazajay means from a semantics/SEO perspective, it should be a H1 tag.