Closed Thread
Thread Tools Search this Thread
Unread 8th May 2010, 09:42 AM   #1
HyperActive Warrior
War Room Member
 
MarcMilburn's Avatar
 
Join Date: 2009
Posts: 157
Thanks: 8
Thanked 68 Times in 29 Posts
Default
Adding javascript to my <head> tags is adding a margin... why?
Share on: 
fb share twitter share gplus share more share

Hi everyone,

I have a minisite design which requires no margins at the top, in order to work with the background image (which repeats).

I also need to add in some javascript which requires 5 lines in the <head></head> section... BUT when I insert it in, it adds a random line above the minisite design.

All of the CSS margins are set to 0.

Anyone know why?

HELP! lol

Thanks,
- Marc

"Discover The Simple Niche Marketing System That Banked As Much As $4,928.34 In Just 24 Days... From Scratch!"
http://www.FastProfitsFormula.com

http://www.warriorforum.com/warrior-...-discount.html
MarcMilburn is offline  
Unread 8th May 2010, 09:51 AM   #2
HyperActive Warrior
War Room Member
 
Join Date: 2010
Posts: 153
Thanks: 9
Thanked 17 Times in 17 Posts
Default
Re: Adding javascript to my <head> tags is adding a margin... why?
Share on: 
fb share twitter share gplus share more share

Could you provide a link to your site? Maybe you just forgot to close the tags? It's pretty hard to tell without the source code. You can also post your source code if you prefer

Hello
ninal is offline  
Unread 8th May 2010, 10:01 AM   #3
HyperActive Warrior
War Room Member
 
MarcMilburn's Avatar
 
Join Date: 2009
Posts: 157
Thanks: 8
Thanked 68 Times in 29 Posts
Default
Re: Adding javascript to my <head> tags is adding a margin... why?
Share on: 
fb share twitter share gplus share more share

<html>
<head>
<title>Coaching Time!</title>
<link rel="stylesheet" href="style.css" type="text/css">
<script type="text/javascript">
function showIt() {
document.getElementById("hid").style.visibility = "visible";
}
setTimeout("showIt()", 1546000); // 1000 = 1 sec
</script>
</head>
<body>
<div class="wrapper">
<div class="header"></div>
<div class="copy">
</div>
<div class="footer"></div>
</div>
</body>
</html>

"Discover The Simple Niche Marketing System That Banked As Much As $4,928.34 In Just 24 Days... From Scratch!"
http://www.FastProfitsFormula.com

http://www.warriorforum.com/warrior-...-discount.html
MarcMilburn is offline  
Unread 8th May 2010, 10:03 AM   #4
HyperActive Warrior
War Room Member
 
MarcMilburn's Avatar
 
Join Date: 2009
Posts: 157
Thanks: 8
Thanked 68 Times in 29 Posts
Default
Re: Adding javascript to my <head> tags is adding a margin... why?
Share on: 
fb share twitter share gplus share more share

Oh and this is taken from the CSS file...

body{
margin:0;
margin-top:0;
text-align:center;
color:#1a1a1a;
background:#2f2f2f url(/images/bg.jpg) repeat-x;
}

"Discover The Simple Niche Marketing System That Banked As Much As $4,928.34 In Just 24 Days... From Scratch!"
http://www.FastProfitsFormula.com

http://www.warriorforum.com/warrior-...-discount.html
MarcMilburn is offline  
Unread 8th May 2010, 11:12 AM   #5
HyperActive Warrior
War Room Member
 
webtrix's Avatar
 
Join Date: 2009
Location: SE Europe
Posts: 112
Thanks: 13
Thanked 8 Times in 8 Posts
Default
Re: Adding javascript to my <head> tags is adding a margin... why?
Share on: 
fb share twitter share gplus share more share

Originally Posted by MilburnMarketing View Post

<html>
<head>
<title>Coaching Time!</title>
<link rel="stylesheet" href="style.css" type="text/css">
<script type="text/javascript">
function showIt() {
document.getElementById("hid").style.visibility = "visible";
}
setTimeout("showIt()", 1546000); // 1000 = 1 sec
</script>
</head>
<body>
<div class="wrapper">
<div class="header"></div>
<div class="copy">
</div>
<div class="footer"></div>
</div>
</body>
</html>
Save this as a page and see if there is a line...

Also margin-top:0; is sufficient here..

PLR SALE: 40 fresh articles for $9.90 ??
Retirement Planning - Pet Vitamins - Secured Loans
webtrix is offline  
Unread 8th May 2010, 11:20 AM   #6
HyperActive Warrior
War Room Member
 
MarcMilburn's Avatar
 
Join Date: 2009
Posts: 157
Thanks: 8
Thanked 68 Times in 29 Posts
Default
Re: Adding javascript to my <head> tags is adding a margin... why?
Share on: 
fb share twitter share gplus share more share

WebTrix...

No, there was no margin there. So I tried replacing my <head></head> section with yours and its FIXED!

Thank you soo much!!

I LOVE this place

"Discover The Simple Niche Marketing System That Banked As Much As $4,928.34 In Just 24 Days... From Scratch!"
http://www.FastProfitsFormula.com

http://www.warriorforum.com/warrior-...-discount.html
MarcMilburn is offline  
Closed Thread


Bookmarks

Tags
&lthead&gt, <head>, adding, javascript, margin, tags

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 12:27 PM.