Div code for ...

Post all your tuts or request for tuts here.
Post Reply
Boo
Posts: 9
Joined: Wed May 04, 2011 8:50 am

Div code for ...

Post by Boo »

Hello Fellows,

I Just wanted to know wich code i need to use to get my menu to the right side.

regards, Boo
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: Div code for ...

Post by hallsofvallhalla »

well depends on how you are doing it,

for a div you could use

Code: Select all

float:right;

in the css
Boo
Posts: 9
Joined: Wed May 04, 2011 8:50 am

Re: Div code for ...

Post by Boo »

My current style.css is

Code: Select all

body {
	background-color: #ffffff;
}
#login {
	position:absolute;
	left:0px;
	top:0px;
	width:800px;
	height:150px;
	z-index:1;
}
#login2 {
	position:absolute;
	left:0px;
	top:200px;
	width:800px;
	height:150px;
	z-index:1;
}
#player {
	position:absolute;
	left:400px;
	top:200px;
	width:450px;
	height:450px;
	z-index:3;
}
#creature {
	position:absolute;
	left:400px;
	top:400px;
	width:450px;
	height:650px;
	z-index:3;
}
#logout {
	position:absolute;
	left:10px;
	top:10px;
	width:150px;
	height:150px;
	z-index:3;
}
#locations {
	position:absolute;
	left:400px;
	top:100px;
	width:450px;
	height:450px;
	z-index:3;
}
#gold {
	position:absolute;
	left:200px;
	top:200px;
	width:150px;
	height:100px;
	z-index:3;
}
#lpanel {
	position:absolute;
	left:10px;
	top:100px;
	width:100px;
	height:200px;
	z-index:3;
}
#hpointsback {
	position:absolute;
	left:10px;
	top:204px;
	width:100px;
	height:15px;
	z-index:1;
}
#hpoints {
	position:absolute;
	left:10px;
	top:204px;
	width:100px;
	height:15px;
	z-index:2;
	text-align:left;
}
#spointsback {
	position:absolute;
	left:10px;
	top:225px;
	width:100px;
	height:15px;
	z-index:1;
}
#spoints {
	position:absolute;
	left:10px;
	top:225px;
	width:100px;
	height:15px;
	z-index:2;
	text-align:left;
}
#table {
	position:absolute;
	left:200px;
	top:105px;
	width:500px;
	height:900px;
	z-index:2;
}
#magic {
	position:absolute;
	left:400px;
	top:100px;
	width:450px;
	height:450px;
	z-index:3;
}
Could you please at the code :P

i realy dont know were i should paste it :/
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: Div code for ...

Post by hallsofvallhalla »

try

Code: Select all

#lpanel {
   position:absolute;
    top:100px;
   width:100px;
   height:200px;
   z-index:3;
  float:right;
}
and you may need to move your lpanel code below your main code
Boo
Posts: 9
Joined: Wed May 04, 2011 8:50 am

Re: Div code for ...

Post by Boo »

But i want to move this menu:

Image

The code u gave moves my stat panel
User avatar
OldRod
Posts: 1320
Joined: Sun Sep 20, 2009 4:26 pm

Re: Div code for ...

Post by OldRod »

Put your menu inside a "rpanel" div and use the code Halls gave you (rename it to rpanel obviously). Looks like that might work.
Boo
Posts: 9
Joined: Wed May 04, 2011 8:50 am

Re: Div code for ...

Post by Boo »

I Still dont get it :?:
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: Div code for ...

Post by hallsofvallhalla »

well what do you want in the middle of the page? Just put it in between the 2 and it will float on its own.
Boo
Posts: 9
Joined: Wed May 04, 2011 8:50 am

Re: Div code for ...

Post by Boo »

Could You please finish the code for me :P
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: Div code for ...

Post by hallsofvallhalla »

next 2 videos are on divs and CSS.
Post Reply

Return to “Tutorials”