(Solved)How to add margin top at "Contact" so that it appears further from the section above it

(Solved)How to add margin top at "Contact" so that it appears further from the section above it
0.0 0

#1

I want the word "Contact " appear away from the grey section. Just like the pic below.
I tried margin-top:30px; did not work at all…

http://codepen.io/zhouxiang19910319/pen/jVqbmg/?editors=1100


#2

Hi,

seems to be working with margin-top 90px when i just checked


#3

Does not work for me???


#4

are you using an ie version by any chance?


#5

Err… no… chrome on OS X


#6

not working in firefox. i am also checked


#7

Try This CSS

#contact {
position:relative;
top:50px;
}


#8

Any idea why??? SOmething wrong with codepen??? I thought I messed it up in CSS


#9

Yes very strange, working fine for me in ie edge and chrome. When i disable the margin-top 90px rule in dev tools it removes the margin as expected.


#10

WOW, it worked. Care to explain???


#11

i think you should check your tags closely weather all opened tags are closed or missing anything.
and i am not prefer this method on production version :slight_smile:


#12

like here :slight_smile:
https://jigsaw.w3.org/css-validator/validator


#13

Okay… i will check… but works for me now… so … Also do you mean that my code is somewhere broken… what you just told me is just a temporary fix??


#14

Okay thanks I will try to understand it… newbie here. XD’’

Link broken???


#15

Just paste in your css and will show any errors.

Always good practice to validate your css.

oops sorry,

https://jigsaw.w3.org/css-validator/#validate_by_input


#16

Oh, wow. HUge thanks! I can use it every time lol


#17

yes hopefully some code is broken somewhere. the best way to check on firefox please follow the steps

1.Open your project.html on firefox
2.Right click the mouse and view-page-source
3.Check the new tab opened
if any of your html tag is not closed it will appears in red

then try to close and check again -repeat- the method :slight_smile:


#18

yes!

I think employers are likely to check your css and html validates when they look at your portfolio.


#19

Also btw, when you guys open my project can you guys see my profile pic there??? Like this???

Just checking whether I used the correct method to insert an image.
I upload the img to dropbox 1st,… then open the image in dropbox… then click "show page source " in chrome and find the src link…


#20

firefox in os x also has this feature???