Jump to content


Div problem


2 replies to this topic

#1 Hoot

    * Hooty Tooty Fruit *

  • Members
  • PipPipPipPip
  • 1,346 posts
  • Gender:Male
  • Location:Canada
  • Interests:Making Websites, Working in 3D, Playing the Drums

Posted 13 October 2005 - 06:54 PM

I am having a heck of a time coding my site with div's the main problem right now is that I have a div for my header called header and then underneath that there is my menu, no when there is no picture everything is fine but when I add the picture it makes a space inbetween the menu and the header :) any help? here is my CSS:
/*Pixel Sweep*/
*
{
	margin: 0px;
	padding: 0px;
}
body
{
	margin: 0 auto;
	background: url('images/bg.gif');
	text-align: center;
}
#main
{
	margin: 0 auto;
	width: 777px;
	background: url('images/bg_main.gif');
	text-align: center;
}
#inside_main
{
	margin: 0 auto;
	width: 775px;
}
#header
{
	margin: 0 auto;
	width: 775px;
	height: 118px;
}
#menu
{
	margin: 0 auto;
	height: 18px;
	width: 775px;
}

Hoot

Edited by Hoot, 13 October 2005 - 06:55 PM.


#2 coolaid

    P2L Jedi Master

  • Members
  • PipPipPipPip
  • 1,435 posts
  • Gender:Male
  • Interests:i wonder..

Posted 13 October 2005 - 09:21 PM

can we see an example, right now i think its becuse you have
margin: auto 0;

#3 Hoot

    * Hooty Tooty Fruit *

  • Members
  • PipPipPipPip
  • 1,346 posts
  • Gender:Male
  • Location:Canada
  • Interests:Making Websites, Working in 3D, Playing the Drums

Posted 13 October 2005 - 09:44 PM

I will get a screen shot in a sec, ok when I am working with it normaly it looks fine but when I preview it, its like the div doesn't keep its height... because I tried puting a <br> in one place and it looked the same in the normal as it did in preview :P

EDIT:

ok here is the screen shots, there used to be a space between the menu and the header but I fixed that by putting the last <div> (</div>) on the same line as the last thing coded (which is strange it should fix it) but in these pics look at the test part in the right and wrong pictures:

RIGHT
Posted Image
see how the text is closer to the header.

WRONG
Posted Image
see how the text is lower, How do I fix that, and also do you know how I can code normaly and not have to put the closing <div> on the last line of its code?

Hoot

Edited by Hoot, 13 October 2005 - 09:55 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users