Please help,big problem with css layout

  You are currently not logged in. You can view the forums, but cannot post messages. Log In | Register

05-Apr-12 20:19
I've got a problem and I just dont know what to do,i've been searching for hours for a solution and I'am desperate.

I tried the website into two different screen resolutions, everything looks fine,all the content is centered perfectly but when I press the restore button to minimize the browser all the layout moves out of place,or background I really don't know,all I can say that I think is the layout that moves out of place.

What could be causing this problem? Here is the code of how my website ,I would appreciate a lot if someone can tell me exactly what's causing this to shift the layout on the right when I resize the browser with restore button.


<?PHP
/*
Contact Form from HTML Form Guide
This program is free software published under the
terms of the GNU Lesser General Public License.
See this page for more info:
http://www.html-form-guide.com/contact-form/simple-modal-popup-contact-form.html
*/
//1. First, include the file popup-contactform.php
require_once('popup-contactform.php');

//2. link to the style file contact.css
?>




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><style type="text/css">
<!--
.bg {
background-image: url(bg1.jpg);
background-repeat: no-repeat;
background-position: center top;
padding-top: 0px;
position: static;
width: auto;
top: 0px;
clip: rect(0px,auto,auto,auto);
margin-top: 10px;
overflow-y:scroll;
background-color: #000;
text-aling: center;
}





#navMenu {
margin:0;
padding:0;
list-style:none;
font-family:arial;
text-align:center;
line-height:60px;
}

#navMenu li {

background:url(default.jpg) no-repeat center center; /* default background image */
width:120px; /* width and height of the menu item */
height:70px;
position:relative; /* must set it as relative, because .hover class top and left with absolute position will be positioned according to li. */
}

#navMenu li a {color:#696969;size:2em;}{
z-index:20; /* z-index must be higher than .hover class */
display:block; /* display as block and set the height according to the height of the menu to make the whole LI clickable */
height:70px;
position:relative;

}

#navMenu li .hover {

background:url(over.jpg) no-repeat center center; /* mouseover image */
position:absolute; /* must be postion absolute */
width:120px; /* width, height, left and top to fill the whole LI item */
height:70px;
left:0;
top:0;
z-index:0; /* display under the Anchor tag */
display:none; /* hide it by default */

;

}
#navMenu li.selected {
background:url(selected.jpg) no-repeat center center; /* selected image */
}

#b {
height: 484px;
width: 170px;
padding-left: 0px;
padding-top: 0px;
top: 0px;
padding-bottom: 0px;
clip: rect(0px,0px,0px,0px);
margin-top: 10px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 40px;
position: static;
}
#nws {
background-color: #00F;
height: 180px;
width: 270px;
padding-right: 0px;
padding-left: 0px;
margin-left: 10px;
padding-top: 0px;
margin-top: 40px;
margin-bottom: 40px;
clip: rect(0px,auto,0px,auto);
bottom: 0px;
top: 0px;
}
#btn1 {
height: 85px;
width: 85px;
background-position: 0px;
bottom: 0px;
top: 0px;
position: relative;
padding-top: 0px;
padding-bottom: 0px;
padding-right: 0px;
margin-right: 0px;
right: 0px;
left: 76px;
}
#bt2 {
height: 86px;
width: 86px;
bottom: 0px;
top: 0px;
left: 0px;
padding-left: 10px;
padding-bottom: 0px;
padding-top: 5px;
}
#b3 {
height: 85px;
width: 85px;
padding-top: 10px;
padding-left: 55px;
}
#va {
height: 85px;
width: 85px;
padding-top: 12px;
}
#e {
height: 85px;
width: 85px;
padding-top: 17px;
padding-left: 40px;
}
#cbtn {
height: 125px;
width: 50px;
}
#extr {
background-color: #FFF;
height: 60px;
width: 400px;
right: 0px;
clip: rect(auto,0px,auto,0px);
left: 0px;
}
#thmbscr {
background-color: #FFF;
height: 150px;
width: 910px;
}
#date {
background-color: #FFF;
height: 50px;
width: 50px;
}
#bbtn {
background-color: #FFF;
height: 24px;
width: 150px;
clip: rect(0px,auto,0px,0px);
left: 0px;
bottom: 0px;
margin-bottom: 10px;
}
#tm {
background-color: #FFF;
height: 10px;
width: 50px;
}
#p1 {
height: 170px;
width: 900px;
}
#bu {
background-color: #FF3;
height: 20px;
width: 20px;
}
#adv {
height: 160px;
width: 790px;
background-position: right;
background-image: url(publicity.png);
}
#a {
background-color: #000;
height: 170px;
width: 920px;
}
#bup {
height: 90px;
width: 70px;
margin-left: 850px;
margin-top: 0px;
margin-bottom: 0px;
padding-top: 0px;
padding-bottom: 0px;
bottom: 0px;
clip: rect(auto,auto,0px,auto);
}
#b2 {
background-color: #C63;
height: 50px;
width: 50px;
}
#pics {
height: 700px;
width: 470px;
margin-bottom: 0px;

}
.thum {
border: 2px solid #222222;
margin: 0 10px 10px 0;
padding: 5px;
line-height:22px;background-color:#000000;
}
.thum img{
border: 1px solid white;
margin: 0 5px 5px 0;

}
.thum:hover{
background-color: #171717;
}
.thum:hover img{
border: 1px solid blue;
}

.thumb-shadow {
float:left;
height:33px;
width:100%;
}
.thum-div {
background-color:#313131;
float:left;
height:146px;
padding:5px 0 0 5px;
width:146px;

}


.thum-shadow {
float:left;
height:33px;
width:100%;
}

.thum-div .sections-overlay {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:transparent url(thumbnail-overlay.png) no-repeat scroll -40px -300px;
float:left;
margin-top:-33px;
}

.sections-overlay {
background-image:url(readmore-bg.png);
opacity: 0;
visibility:hidden;
background-position: 0px -167px;
}

-->
</style>
<head>
<script type="text/javascript" src="js/jquery-1.3.1.min.js"></script>


<script type="text/javascript">

//<![CDATA[


$(document).ready(function () {

//Append a div with hover class to all the LI
$('#navMenu li').append('<div class="hover"><\/div>');


$('#navMenu li').hover(

//Mouseover, fadeIn the hidden hover class
function() {

$(this).children('div').stop(true, true).fadeIn('1000');

},

//Mouseout, fadeOut the hover class
function() {

$(this).children('div').stop(true, true).fadeOut('1000');

}).click (function () {

//Add selected class if user clicked on it
$(this).addClass('selected');

});

});

//]]>

</script>
<link rel="stylesheet" href="css/thumbnailviewer.css" type="text/css" />

<script src="js/thumbnailviewer.js" type="text/javascript">

<script type="text/javascript" src="js/prototype.js" type="text/javascript"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="simpleTicker.css">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>

<script type='text/javascript' src='scripts/gen_validatorv31.js' type="text/javascript"></script>
<script type='text/javascript' src='scripts/fg_ajax.js'type="text/javascript"></script>
<script type='text/javascript' src='scripts/fg_captcha_validator.js' type="text/javascript"></script>
<script type='text/javascript' src='scripts/fg_moveable_popup.js' type="text/javascript"></script>
<script type='text/javascript' src='scripts/fg_form_submitter.js' type="text/javascript"></script>

<link rel="STYLESHEET" type="text/css" href="popup-contact.css">
<!--[if lte IE 7]>
<link href="css/fixed4ie.css" rel="stylesheet" type="text/css">
<script type="text/javascript">onload = function() { content.focus() }</script>
<![endif]-->


<script type="text/javascript" src="jquery.thumbnailScroller.js"></script>

<link href="jquery.thumbnailScroller.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js" type="text/javascript"></script>
<script src="jquery-ui-1.8.13.custom.min.js" type="text/javascript"></script>


</head>

<body class="bg">


<table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="165"> <div valign="top">
<table width="638" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td width="626" height="165" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="628" height="147" hspace="2" align="top" id="FlashID" title="hd">
<param name="movie" value="Header retry/headerr.swf" />
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="6.0.65.0" />
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<param name="SCALE" value="exactfit" />
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object data="Header retry/headerr.swf" type="application/x-shockwave-flash" width="628" height="147" hspace="2" align="top">
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="6.0.65.0" />
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<param name="SCALE" value="exactfit" />

<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object></td>
</tr>
</table>
</div></td>
</tr>
</table>
<table width="960" height="1141" border="0" align="center" cellpadding="0" cellspacing="10">
<tr>
<td width="960" height="1119"><table width="939" height="800" border="0" cellpadding="4" cellspacing="0">
<tr align="center" valign="top">
<th width="301" height="950" scope="row"><table width="300" height="896" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td width="307" height="894" scope="col"><div class="menu" id="b" align="left">
<ul id="navMenu">
<li><a href="#"><b>HOME</b></a></li>
<li><a href="#"><b></b></a></li>
<li><a href="#"><b>ART</b></a></li>
<li><a href="#"><b></b></a></li>
<li><a href="#"><b>EVENTS</b></a></li>
<li><a href="#"><b></b></a></li>
</ul>
</div>
</div>
<p>&nbsp;</p>
<p align="left">&nbsp; </p>
<div id="img"></div>
<p align="left">&nbsp;</p>
<div class="news" id="nws"> <dl id="ticker" align="left">
<dt class="heading">dt><dd class="text">All updates on events.</dd>
<dt class="heading"></dt><dd class="text">Coming Soon...</dd>
<dt class="heading"> - Feb 2012</dt><dd class="text">Like Art? A new forum dedicated to all the Artists of our Time,coming near our screens</dd>
<dt class="heading">3D Animation Short Movie</dt><dd class="text"> SPRING 2012...</dd>
<dt class="heading"></dt><dd class="text">New Theme: "Mind's Spheres".</dd>
<dt class="heading"></dt><dd class="text">More info on the movie and story coming soon...</dd>
<dt class="heading"></dt><dd class="text">new updates..</dd>
<dt class="heading"> Events 2012</dt><dd class="text">Further info coming soon..</dd>
</dl><div id="tickerContainer" align="left">

</div>

<script type="text/javascript">
$(function() {

//cache the ticker
var ticker = $("#ticker");

//wrap dt:dd pairs in divs
ticker.children().filter("dt").each(function() {

var dt = $(this),
container = $("<div>");

dt.next().appendTo(container);
dt.prependTo(container);

container.appendTo(ticker);
});

//hide the scrollbar
ticker.css("overflow", "hidden");

//animator function
function animator(currentItem) {

//work out new anim duration
var distance = currentItem.height();
duration = (distance + parseInt(currentItem.css("marginTop"))) / 0.025;

//animate the first child of the ticker
currentItem.animate({ marginTop: -distance }, duration, "linear", function() {

//move current item to the bottom
currentItem.appendTo(currentItem.parent()).css("marginTop", 0);

//recurse
animator(currentItem.parent().children(":first"));
});
};

//start the ticker
animator(ticker.children(":first"));

//set mouseenter
ticker.mouseenter(function() {

//stop current animation
ticker.children().stop();

});

//set mouseleave
ticker.mouseleave(function() {

//resume animation
animator(ticker.children(":first"));

});
});
</script></div>
</div>
</td>
</tr>
</table></th>
<th width="550" valign="top" scope="row"><table width="500" height="741" border="0" align="right" cellpadding="0" cellspacing="10">
<tr>
<td width="344" height="719"><div id="pics">;
<p> paintings
</p>


</p>
<p align="center">&nbsp;</p></div></td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="extr">content here

</div>
<p>&nbsp;</p></th>
<th width="64" valign="top" scope="row"><div id="cbtn"><a href='javascript:fg_popup_form("fg_formContainer","fg_form_InnerContainer","fg_backgroundpopup");'
><img src='buttonC.png' name="cn" width='50' height='125' border='0' id="cn" alt="" /></a></div></th>
</tr>
</table>
<table width="935" height="167" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="931" height="113"><div id="thmbscr"><div id="tS2" class="jThumbnailScroller">
<div class="jTscrollerContainer">
<div class="jTscroller">
<a href="askevents.html"><img src="thumbs/img1.jpg" alt=""/></a>
<a href="#"><img src="thumbs/img2.jpg" alt=""/></a>
<a href="#"><img src="thumbs/img3.jpg" alt=""/></a>
<a href="#"><img src="thumbs/img4.jpg" alt=""/></a>
<a href="#"><img src="thumbs/img6a.jpg" alt=""/></a>
<a href="#"><img src="thumbs/img6.jpg" alt=""/></a>
<a href="#"><img src="thumbs/img7.jpg" alt="" /></a>
<a href="#"><img src="thumbs/img8.jpg" alt=""/></a>
<a href="#"><img src="thumbs/img9.jpg" alt=""/></a>
<a href="#"><img src="thumbs/img10.jpg" alt=""/></a>
<a href="#"></a>



</div>
</div>
<a href="#" class="jTscrollerPrevButton"></a>
<a href="#" class="jTscrollerNextButton"></a>
</div>
</div></div></td>

</tr>

</table></td>
</tr>
<script src="jquery.thumbnailScroller.js" type="text/javascript"></script>

<SCRIPT TYPE="text/javascript">
<!--
if (document.images)
{
SLIDES.set_image(document.images.SLIDESIMG);
SLIDES.set_textid("SLIDESTEXT"); // optional
SLIDES.update();
SLIDES.play(); //optional
}
//-->
</SCRIPT>



<script>
jQuery.noConflict();
(function($){
window.onload=function(){
$("#tS2").thumbnailScroller({
scrollerType:"hoverPrecise",
scrollerOrientation:"horizontal",
scrollSpeed:2,
scrollEasing:"easeOutCirc",
scrollEasingAmount:600,
acceleration:4,
scrollSpeed:800,
noScrollCenterSpace:10,
autoScrolling:0,
autoScrollingSpeed:2000,
autoScrollingEasing:"easeInOutQuad",
autoScrollingDelay:500
});
}
})(jQuery);
//-->
</script>
</table>
<table width="963" height="163" border="0" align="center" cellpadding="0" cellspacing="20">
<tr>
<td width="960" height="21" align="left" valign="top"><div id="p1">
<div id="a">
<div id="adv">
<div id="bup"><a href="#top" position="right"><img src="top.png" width="72" height="90" /></a></div>
</div>
</div></td>
</tr>
</table>
<table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="960" height="74" align="right" valign="middle"><div id="bottom"><img src="tui.png" alt="" width="960" border="1" align="middle" />
<div id="bottom"><a href="" target="_blank"><img src="FB.png" width="21" height="24" /></a><a href=""></a> <a href="" target="_blank"><img src="myspace.png" alt="" width="22" height="24" /></a> <a href" target="_blank"><img src="youtube.png" width="22" height="24" /></a><a href="/" target="_blank"><img src="blog.png" width="22" height="24" /></a><a href="" target="_blank"><img src="twitter.png" width="22" height="24" /></a></div>
</div></td>
</tr>
</table>

<div id='bar'>
<style type="text/css">
#bottom {
width: 76%;
position: fixed;
bottom: 30px;
border-top: 2px solid #000000;
border-left: ;
border-right: ;

-moz-border-radius-topleft: 7px;
-moz-border-radius-topright: 7px;
margin-bottom:-30px;
}

</style>
</div>

<div id='fg_formContainer'>
<div id="fg_container_header">
<div id="fg_box_Title">Contact us</div>
<div id="fg_box_Close"><a href="javascript:fg_hideform('fg_formContainer','fg_backgroundpopup');">Close(X)</a></div>
</div>

<div id="fg_form_InnerContainer">
<form id='contactus' action='javascript:fg_submit_form()' method='post' accept-charset='UTF-8'>

<input type='hidden' name='submitted' id='submitted' value='1'/>
<input type='hidden' name='<?php echo $formproc->GetFormIDInputName(); ?>' value='<?php echo $formproc->GetFormIDInputValue(); ?>'/>
<input type='text' class='spmhidip' name='<?php echo $formproc->GetSpamTrapInputName(); ?>' />
<div class='short_explanation'>* required fields</div>
<div id='fg_server_errors' class='error'></div>
<div class='container'>
<label for='name' >Your Full Name*: </label><br/>
<input type='text' name='name' id='name' value='' maxlength="50" /><br/>
<span id='contactus_name_errorloc' class='error'></span>
</div>
<div class='container'>
<label for='email' >Email Address*:</label><br/>
<input type='text' name='email' id='email' value='' maxlength="50" /><br/>
<span id='contactus_email_errorloc' class='error'></span>
</div>
<div class='container'>
<label for='message' >Message:</label><br/>
<span id='contactus_message_errorloc' class='error'></span>
<textarea rows="10" cols="50" name='message' id='message'></textarea>
</div>
<div class='container'>
<div><img alt='Captcha image' src='show-captcha.php?rand=1' id='scaptcha_img' /></div>
<label for='scaptcha' >Enter the code above here:</label>
<input type='text' name='scaptcha' id='scaptcha' maxlength="10" /><br/>
<span id='contactus_scaptcha_errorloc' class='error'></span>
<div class='short_explanation'>Can't read the image?
<a href='javascript: refresh_captcha_img();'>Click here to refresh</a>.</div>
</div>


<div class='container'>
<input type='submit' name='Submit' value='Submit' />
</div>
</form>
</div>
</div>
<!-- client-side Form Validations:
Uses the excellent form validation script from JavaScript-coder.com-->

<script type='text/javascript'>
// <![CDATA[

var frmvalidator = new Validator("contactus");
frmvalidator.EnableOnPageErrorDisplay();
frmvalidator.EnableMsgsTogether();
frmvalidator.addValidation("name","req","Please provide your name");

frmvalidator.addValidation("email","req","Please provide your email address");

frmvalidator.addValidation("email","email","Please provide a valid email address");

frmvalidator.addValidation("message","maxlen=2048","The message is too long!(more than 2KB!)");

frmvalidator.addValidation("scaptcha","req","Please enter the code in the image above");


document.forms['contactus'].scaptcha.validator
= new FG_CaptchaValidator(document.forms['contactus'].scaptcha,
document.images['scaptcha_img']);

function SCaptcha_Validate()
{
return document.forms['contactus'].scaptcha.validator.validate();
}

frmvalidator.setAddnlValidationFunction("SCaptcha_Validate");

function refresh_captcha_img()
{
var img = document.images['scaptcha_img'];
img.src = img.src.substring(0,img.src.lastIndexOf("?")) + "?rand="+Math.random()*1000;
}

document.forms['contactus'].refresh_container=function()
{
var formpopup = document.getElementById('fg_formContainer');
var innerdiv = document.getElementById('fg_form_InnerContainer');
var b = innerdiv.offsetHeight+40+30;

formpopup.style.height = b+"px";
}

document.forms['contactus'].form_val_onsubmit = document.forms['contactus'].onsubmit;


document.forms['contactus'].onsubmit=function()
{
if(!this.form_val_onsubmit())
{
this.refresh_container();
return false;
}

return true;
}
function fg_submit_form()
{
//alert('submiting form');
var containerobj = document.getElementById('fg_form_InnerContainer');
var sourceobj = document.getElementById('fg_submit_success_message');
var error_div = document.getElementById('fg_server_errors');
var formobj = document.forms['contactus']

var submitter = new FG_FormSubmitter("popup-contactform.php",containerobj,sourceobj,error_div,formobj);
var frm = document.forms['contactus'];

submitter.submit_form(frm);
}

// ]]>
</script>

<div id='fg_backgroundpopup'></div>

<div id='fg_submit_success_message'>
<h2>Thanks!</h2>
<p>
Thanks for contacting us. We will get in touch with you soon!
<p>
<a href="javascript:fg_hideform('fg_formContainer','fg_backgroundpopup');">Close this window</a>
<p>
</p>
</div>





<script type="text/javascript">
<!--
swfobject.registerObject("FlashID");

//-->
</script>

</body>
</html>

[Edited by MerlinA on 05-Apr-12 20:22]
09-Apr-12 14:59
Provide a URL for YOUR page with the problem, NOT the fully working tutorial/example please.

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/
09-Apr-12 17:23
Hi MerlinA,

I scrolled trough the code and just taught "too many tables".
Try to use <div>s as much as possible, and close the divs after tables, if the table do not contain any divs like:

<div class="x">
<table>
<tr></tr>
</table>
</div>


And wassup with all the empty paragraphs and &nbsp;?
A wise thing to do is to clean up your code as mush as possible!

And for best support, give us the concrete example. Upload your site in a temporary folder and post a link here

Do not forget to use the code (<>)-button if posting code.

Peaaacccee!
11-Apr-12 10:02
i try to change like you said about cleaning up the css with tables and closing divs but the moment I do that everything in the content moves out of place,I'am so confused about the css, plus I noticed when I restore the browser I think that background image moves on the left can anyone please help me, I really want to finish this website.


Plus how can I make only divs without tables, I tried before but it doesent stay in place like with tables it does, I tried in two resolutions and with the table it stays in place.


Please help me,

* I need to know also how to stop the background image from moving on the left everytime I restore the browser.


* stop the background from stretching vertically in a smaller resolution.

*Also to stop the text from coming out of div when I change screen resolution it sticks out of the page and forms an horizontal scroll bar.


* also if anyone knows any pop up contact form that actually works with captcha in it and is compatible with other scrips (java and jquery and prototype.js)


Please help me, Iam desperate

[Edited by MerlinA on 11-Apr-12 10:08]
21-Apr-12 18:14
please helppppp meeeeeeeeeeeeeeeeeeee
22-Apr-12 06:51
Provide a URI to the problem document and we may be able to!

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/

 
New posts
Old posts

Follow Elated