Jump to content


Any DIV masters in the house?


4 replies to this topic

#1 Mooey

    Retired P2L Staff

  • Members
  • PipPipPip
  • 585 posts
  • Gender:Male
  • Location:UK
  • Interests:http://500px.com/mikeholman
    http://holmanmedia.net

Posted 21 March 2007 - 06:09 AM

I've just uploaded a site and its not displaying the background properly. I've used DIV's which work great on my laptop, but as soon as its been uploaded it wont work online.

http://linfordgardendesigns.co.uk/

You can link to the files so there definately online:
http://linfordgarden...arkgreyBack.gif
http://linfordgarden...ghtGreyBack.gif

The code I've used is:

div#container {
background-image:url(images/lightGreyBack.gif);
position: absolute;
padding-top: 0px;
left: 50%;
top: 0px;
width: 956px;
margin-left: -478px;
bottom: 100%;
height: 100%;

}

and

div#centercontent {
background-image:url(images/DarkgreyBack.gif);
background-repeat:repeat-y;
height:50%;
padding:20px 40px 20px 40px;
}

Cookie to anybody who can help :lol:

Edited by Mooey, 21 March 2007 - 07:06 AM.


#2 Mooey

    Retired P2L Staff

  • Members
  • PipPipPip
  • 585 posts
  • Gender:Male
  • Location:UK
  • Interests:http://500px.com/mikeholman
    http://holmanmedia.net

Posted 21 March 2007 - 08:17 AM

Its sorted, its case sensitive and I typed it in wrong on the CSS.

Mods - you can close this, cheers.

#3 _*Creative Insanity_*

  • Guests

Posted 21 March 2007 - 12:09 PM

div#container
Why do people do it like above when
#container
is all you need. Is there a purpose for the div in the front?

#4 NGPixel

    Senior Programmer

  • P2L Staff
  • PipPipPipPip
  • 1,410 posts
  • Gender:Male
  • Location:Montreal, Canada
  • Interests:Web Design : Coding : Animation

Posted 21 March 2007 - 12:42 PM

it limits the use of the CSS class to Divs only. You could have the same name for 2 different objects.

#5 Mooey

    Retired P2L Staff

  • Members
  • PipPipPip
  • 585 posts
  • Gender:Male
  • Location:UK
  • Interests:http://500px.com/mikeholman
    http://holmanmedia.net

Posted 22 March 2007 - 03:51 AM

I dont know what happened yesterday when I posted that code, it was from the wrong style sheet :g[1]:

It should of been

#maincontent {
	float:left; 
	width: 956px;
	padding: 0px 0px 0px 0px;
	background-image:url(images/DarkgreyBack.gif);
	background-repeat:repeat-y;
}

and

#wrapper {
	height:100%;
	text-align: left;
	width: 956px;
	margin: 0 auto;
	background: #FFF;
	background-image:url(images/lightGreyBack.gif);
	background-repeat:repeat-y;
}

I think I was having a 'senior' moment :flowers:





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users