blufish Posted August 6, 2008 Share Posted August 6, 2008 Okay here is my code <html> <head> <title>My Site</title> <style type="text/css"> body { margin: 0; padding: 0; background-image: url('back.gif'); background-color: #cccccc; } p {margin: 10px 10px 10px 10px;} div {design: inline;} </style> </head> <body><center> <div style="background-image: url('fore.gif'); background-color: 330099; width: 80%; margin-bottom: 0px;"><img src="logo.gif" width=75%><br><img src="slogan.gif" width=35%></div><div style="background-color: white; width: 80%; text-align: left; text-margin: 10; margin-top: 0px;"> <p>Lorum ipsum dolor and all that other stuff...</p> </div> </body> </html> My problem is that in Internet Explorer there is no space between the boxes (thats what I want). But in Safari and Flock there is a space there, how can I get rid of the space? Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted August 6, 2008 Share Posted August 6, 2008 I would really LOVE to help and so would many other people... but you need to understand that just "dumping" code won't help. I can barely read that html code because it is poorly formatted. Please follow a formatting standard (like this one): <html> <head> <title>Something</title> </head> <body> ....... </body> </html> Isn't that easier to read? Quote Link to comment Share on other sites More sharing options...
blufish Posted August 6, 2008 Author Share Posted August 6, 2008 Got it! <html> <head> <title>My Site</title> <style type="text/css"> body { margin: 0; padding: 0; background-image: url('back.gif'); background-color: #cccccc; } p {margin: 10px 10px 10px 10px;} div {design: inline;} </style> </head> <body> <center> <div style="background-image: url('fore.gif'); background-color: 330099; width: 80%; margin-bottom: 0px;"><img src="logo.gif" width=75%><br><img src="slogan.gif" width=35%></div> <div style="background-color: white; width: 80%; text-align: left; text-margin: 10; margin-top: 0px;"> <p>Lorum ipsum dolor and all that other stuff...</p> </div> </body> </html> Quote Link to comment Share on other sites More sharing options...
secoxxx Posted August 6, 2008 Share Posted August 6, 2008 <div style="clear:both;"></div> is an appropriate line break for div/css Quote Link to comment Share on other sites More sharing options...
blufish Posted August 6, 2008 Author Share Posted August 6, 2008 <div style="clear:both;"></div> is an appropriate line break for div/css Doesn't work... Quote Link to comment Share on other sites More sharing options...
secoxxx Posted August 6, 2008 Share Posted August 6, 2008 Works perfectly fine. <div style="background-image: url('fore.gif'); background-color: 330099; width: 80%; margin-bottom: 0px;"> <img src="logo.gif" width=75%> <div style="clear:both;"></div> <img src="slogan.gif" width=35%> </div> <div style="background-color: white; width: 80%; text-align: left; text-margin: 10; margin-top: 0px;"> <p>Lorum ipsum dolor and all that other stuff...</p> </div> Quote Link to comment Share on other sites More sharing options...
blufish Posted August 6, 2008 Author Share Posted August 6, 2008 Works perfectly fine. <div style="background-image: url('fore.gif'); background-color: 330099; width: 80%; margin-bottom: 0px;"> <img src="logo.gif" width=75%> <div style="clear:both;"></div> <img src="slogan.gif" width=35%> </div> <div style="background-color: white; width: 80%; text-align: left; text-margin: 10; margin-top: 0px;"> <p>Lorum ipsum dolor and all that other stuff...</p> </div> The space inbetween the divs is still there in flock and safari. Quote Link to comment Share on other sites More sharing options...
secoxxx Posted August 6, 2008 Share Posted August 6, 2008 you should really look into redoing your code. its a mess. and how many people really use flock. you should worry more about FF,IE,Opera and Safari Quote Link to comment Share on other sites More sharing options...
blufish Posted August 6, 2008 Author Share Posted August 6, 2008 you should really look into redoing your code. its a mess. and how many people really use flock. you should worry more about FF,IE,Opera and Safari Flock is part of FF, I haven't tested opera and it doesn't work with Safari. Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted August 7, 2008 Share Posted August 7, 2008 You should really learn to shorten your code just a bit. margin: 10px 10px 10px 10px; --> margin: 10px; background-image: url()..; background-color: ...; to: background: url(images/bg.png) repeat-x #fff; Quote Link to comment Share on other sites More sharing options...
blufish Posted August 7, 2008 Author Share Posted August 7, 2008 Is it possible to get rid of the space? Quote Link to comment Share on other sites More sharing options...
haku Posted August 7, 2008 Share Posted August 7, 2008 Since you have no bottom margin on the top div, and no top margin on the bottom div, the only thing I can think that it may be is that there is a margin on the image inside the top div. Set the margin on the images to zero, and see what happens. <div style="clear:both;"></div> is an appropriate line break for div/css I don't know where you ever got that idea. It's not a line break at all, much less an appropriate one. Quote Link to comment Share on other sites More sharing options...
secoxxx Posted August 7, 2008 Share Posted August 7, 2008 Since you have no bottom margin on the top div, and no top margin on the bottom div, the only thing I can think that it may be is that there is a margin on the image inside the top div. Set the margin on the images to zero, and see what happens. <div style="clear:both;"></div> is an appropriate line break for div/css I don't know where you ever got that idea. It's not a line break at all, much less an appropriate one. after reading his confusing question and script twice i realized that. Quote Link to comment Share on other sites More sharing options...
blufish Posted August 7, 2008 Author Share Posted August 7, 2008 It was the margins of a <p> tag . Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.