Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-11-2012, 02:29 AM   PM User | #1
mbayabo
New to the CF scene

 
Join Date: Jun 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
mbayabo is an unknown quantity at this point
Position and size fixed within container

I have a problem. I'm trying to contain the dpad and the buttons within their container while being fixed so that when the user scrolls, it follows the page. It works. However, when the page is resized, it gets screwed up. I have no idea how to fix it. If you have google chrome, you can experiment with the code.

Here's the link:

http://www.kazecompany.com/wp-conten..._template2.php

Here's the CSS:

Code:
body {
	font-family: Verdana, Geneva, sans-serif;
	line-height: 150%;
}

a {
	color:#000;
	text-decoration:none;	
}

#bg-overlay {
	position: relative;	
}

/* HEADER */
#header {
	margin-top: 20px;
	position: relative;
}

#access {
	top: 30%;
	background:url(nav.png) center no-repeat;
	background-size: 100% auto;
	height: 250px;
	max-width: 250px;
	width: 100%;
	position: fixed;
}

#access ul {
	list-style-type:none;
	text-align:center;
	display: block;
}

#access ul a {
	display: block;
	background:#CCCCCC;
	width: 60px;
}

#team, #shop {
	margin-left: 38%;	
}

#team {
	margin-top: 30%;
}

/* CONTENT */

#content {
	margin-top: 20px;
}

#content h1 {
	font: normal 32px/125% Verdana, Geneva, sans-serif;
}

#content h3 {
	font: 90%/130% Arial, Helvetica, sans-serif;	
}

/* FOOTER */
#footer {
	background:#999;
	position: relative;
}

#footer ul {
	list-style-type:none;
	text-align:center;
	display: inline;
}

#footer ul a {
	display: block;
	background:#CCCCCC;
	width: 75px;
}

#google, #top {
	margin-left: 35%;	
}

#social {
	top: 30%;
	max-width: 250px;
	width: 100%;
	background:url(social.png) center no-repeat;
	background-size: 100% auto;
	height: 250px;
	position: fixed;	
}
Thank you guys in advance!
mbayabo is offline   Reply With Quote
Old 06-11-2012, 04:31 AM   PM User | #2
BuildMyWeb
New Coder

 
Join Date: May 2012
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
BuildMyWeb is an unknown quantity at this point
im not understanding what the problem is. what do you mean by "screwed up"? what is supposed to happen vs what is happening?
BuildMyWeb is offline   Reply With Quote
Old 06-11-2012, 05:30 AM   PM User | #3
mbayabo
New to the CF scene

 
Join Date: Jun 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
mbayabo is an unknown quantity at this point
I apologize. I completely forgot to mention the problem. If you resize your browser, the dpad and the button's width and height don't adjust accordingly. it should be that as you resize your browser, the dpad get's smaller, same as the width of the div. but it's not.

Last edited by mbayabo; 06-11-2012 at 05:32 AM..
mbayabo is offline   Reply With Quote
Old 06-12-2012, 07:12 AM   PM User | #4
mbayabo
New to the CF scene

 
Join Date: Jun 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
mbayabo is an unknown quantity at this point
bump please? sorry. i really really need some help.
mbayabo is offline   Reply With Quote
Old 06-12-2012, 10:20 AM   PM User | #5
Richter
New Coder

 
Join Date: Jun 2012
Posts: 63
Thanks: 0
Thanked 11 Times in 11 Posts
Richter is an unknown quantity at this point
May I ask ? what is the dpad ? I will skip to mention about it for now, seem like you want your button and content resize when browser window resize, in this case you need to config your button's height and width as percent not pixel, to do that you need to add this config into you css for set height as percent.

Code:
html, body {height:100%;}
Richter is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 04:56 PM.


Advertisement
Log in to turn off these ads.