Page 1 of 4 123 ... LastLast
Results 1 to 10 of 35

Thread: Yelp!

  1. #1
    Join Date
    Aug 2008
    Posts
    25
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Default Yelp!

    Name's Sean here, nice to meet you all, and I look forward to learning something new at this forum, seems like a friendly little place.
    So I came up with this lovely design for the company I'm working for, because they're website now is just utter crap. I figured instead of coding my usual way (a mess and unvalidated) I'd start off making it as clean and css-friendly as possible. I've run into some major issues, some common and some not. If any of you could help me, I would be extremely grateful.

    My main problem is my issue with internet explorer. I've positioned everything to match up perfectly in Firefox, the site looks great and is aligned fairly well. However, when the site hits IE, everything shifts a couple pixels and throws everything off. Anyone know why this is happening? There is also a gap at the top of the page in IE, which isn't present in firefox.

    I also can't figure out how to pus the footer to the bottom. I wanted another footer that stretched the whole page at the bottom (similar to the top), with a sort of 'prefooter' on top of it. I can't figure out how to just push a regular footer to the bottom, and I've tried all the fixes I can find online. Any idea why?

    Here is the site:
    http://www.chromaticstudios.net/AVT/

  2. #2
    Join Date
    Aug 2008
    Posts
    25
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Default

    Here is the code:
    Code:
    <!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">
    <head>
    <title>AVT</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    <!--
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
    
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    //-->
    </script>
    </head>
    <body>
    <div id="fluid-bar"></div>
    
    <div id="container">
    	<!--Menu-->
    	<div id="menubg">
    		<div id="menuitem1"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('link1','','images/link1_over.jpg',1)"><img src="images/link1.jpg" name="link1" width="135" height="63" 	 border=	"0" id="link1" alt="home" /></a>
            </div>
      		<div id="menuitem2">
            </div>
    	</div>
        <!--End Menu-->
        <!--Header-->
    	<div id="header">
        	<div id="textnava">
            	<div id="textnavb">
        	  		link 1 | link 2 | link 3 | link 4</div>
        		</div>
            </div>
        <!--End Header-->
        <!--Main Content-->
    	<div id="content">
    	  <div id="main">
    	    <div id="maincontent">
                  <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent  sollicitudin nisl nec lorem. Vestibulum tempor pellentesque nisi. In  pretium. Integer euismod leo id risus gravida 		ullamcorper. Curabitur  interdum justo nec nisi. Vestibulum elementum adipiscing dui. Proin sed  magna. Phasellus lectus libero, dapibus sit amet, tincidunt ut,  scelerisque sit amet, justo. Nunc nisi risus, gravida vitae, ultricies  in, lacinia sed, lacus. Nulla libero. Morbi dolor purus, dignissim  eget, ornare sed, volutpat et, arcu. Praesent pharetra neque non  sapien. Etiam vitae elit. Maecenas elementum semper felis. Suspendisse  potenti. Nunc lorem. Vestibulum ante ipsum primis in faucibus orci  luctus et ultrices posuere cubilia Curae; Quisque interdum ultrices  lacus. Mauris leo. Nulla lacus eros, placerat quis, eleifend sit amet,  tincidunt id, eros. </p>
    		      <p>Cras consectetuer dictum turpis. Pellentesque nunc. Proin nisi dui,  dapibus at, vehicula quis, hendrerit a, nisi. Suspendisse accumsan,  mauris et pulvinar porta, mauris eros gravida est, eu sodales magna  risus adipiscing nibh. </p>
    	    </div>
          </div>
           </div>
    	  <div id="right">
    	  </div>
    </div>
    <div id="footer">    </div>
    </body> 
    </html>
    Here is the CSS:
    Code:
    @charset "utf-8";
    /* CSS Document */
    html {
    height: 100%;
    }
    
    body { 
    	background-image:url(images/pagebg.jpg);
    	background-repeat: repeat-y;
    	background-position: center center;
    	background-color: #000000;
    	height: 100%;
    }
    
    #container {
    	min-height: 100%;
    	_height: 100%;
    	position: relative;
    	top: 10px;
    	padding-bottom: 40px;
    }
    
    #fluid-bar {
    	border: 0px;
    	width: 100%;
    	height: 20px;
    	position: absolute;
    	background-image: url(images/headerbg.jpg);
    	background-repeat: repeat-x;
    	top: 0px;
    	left: 0px;
    
    }
    
    #menubg	{
    	border: 0px;
    	width: 900px;
    	height: 63px;
    	background-image: url(images/menu_bg.jpg);
    	margin: auto;
    	top: 20px;
    }
    #menuitem1{
    	border: 0px;
    	width: 135px;
    	height: 63px;
    	margin: auto;
    	top: 20px;
    	float: left;
    }
    #menuitem2{
    	border: 0px;
    	width: 135px;
    	height: 63px;
    	margin: auto;
    	top: 20px;
    	float: left;
    }
    #header {
    	margin-left: auto;
    	margin-right: auto;
    	width: 970px;
    	height: 270px;
    	background-image: url(images/avtbanner.jpg);
    	background-position: center center;
         }
    	 
    #textnava {
    	width: 575px;
    	height: 20px;
    	padding-left: 35px;
    	margin-top: 175px;
    	position: absolute;
    	}
    #textnavb {
    	background-color: #000;
    	color: #FFFFFF;
    	width: 505px;
    	height: 20px;
    	padding-left: 150px;
    	padding-top: 8px;
    	opacity:  .5;
    	position: absolute;
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	font-size: 10pt;
    	}
    #content {
    	margin-left: auto;
    	margin-right: auto;
    	width: 900px;
    	padding-bottom: 40px;
    }
    
    	
    #right{
    	border: 0px;
    	width: 230px;
    	float: right;
    	padding-left: 20px;
    	padding-top: 4px;
    	padding-right: 5px;
    	padding-bottom: 40px;
    }
    #rightcontent_top{
    	border: 0px;
    	width: 220px;
    	height: 40px;
    	clear: left;
    	padding-bottom: 40px;
    	}
    
    #main{
    	border: 0px;
    	width: 610px;
    	float: left;
    	padding-left: 15px;
    	padding-top: 4px;
    	padding-right: 5px;
    	padding-bottom: 40px;
    }
    
    #maincontent{
    	border: 0px;
    	width: 590px;
    	height: auto;
    	float: left;
    	background-image: url(images/content_center.jpg);
    	padding: 5px;
    	color:#CCCCCC;
    	font-size: 10px;
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	border-top: solid;
    	border-bottom-color: #444;
    	border-bottom-style: solid;
    	border-bottom-width: medium;
    	border-top-color: #444;
    	border-top-width: medium;
    	padding-bottom: 40px;
    	}
    	
    #footer {
    	margin-left: auto;
    	margin-right: auto;
    	margin-bottom: 0px;
    	width: 900px;
    	height: 30px;
    	clear: both;
    	background: #000000;
    	position: relative;
         margin-top:-40px;
    	}
    Any help would be awesome, I don't know how much I could thank you guys. I'm really trying hard to learn this thing, because I have fallen in love with what CSS can do.

  3. #3
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    Place this in your CSS and it should fix the gap in the header...

    Code:
    *{
    margin:0;
    padding:0;
    }
    Also, this should put your footer all the way to the bottom in IE:
    Code:
    #footer {
    	width: 900px;
    	height: 30px;
    	clear: both;
    	background: #000000;
    	position: relative;
    	margin:40px auto 0;
    	}
    
    #content {
    	margin-left: auto;
    	margin-right: auto;
    	width: 900px;
    	padding-bottom: 40px;
    	margin-bottom: 40px;
    }
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  4. The Following User Says Thank You to TheJoshMan For This Useful Post:

    smswetz (08-08-2008)

  5. #4
    Join Date
    Aug 2008
    Posts
    25
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Default

    well it's on it's way now! The margin for the css made a bit of an overlap where the menu meets the top bar, I'll play around with it see what I can do. If you have any ideas how to fix that, then that would be cool as well. I appreciate the help
    Any idea how to fix the small pixel shift in IE? I feel like it's probably because my code is an absolute mess....am I getting in too deep, do you think it'd be better for me to start over and refine the code?

  6. #5
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    I do think that you may need to think about HOW you're going to layout the site BEFORE you start. That seems to be the problem alot of people have lately. They get started with only the basic idea, then they decide they want this or that and the design/coding changes and pretty soon, they have far too many divs and spans and such. I saw another post on here the other day, I can't remember where it was... But it was about "Divinitis" you should search google for it using boolean terms.

    "Divinitis & CSS"
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  7. #6
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    I noticed in your CSS for the "Footer", you have "margin-top:" set to "-40px".

    By setting it to -40px that will move the element 40px TOWARDS the top
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  8. #7
    Join Date
    Aug 2008
    Posts
    25
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Default

    Oh I've read it, and I will admit I have a terrible case of divinitis. I use it as a form of organization, and i always think everything needs to be in a div to add attributes to it. It's my way of thinking, and it's terrible, I know.

    I started the design over in terms of coding, and it's coming alot cleaner. I'm still having that damn issue in Internet explorer, it doesn't seem to be centering the header when the page expands, and it needs a one pixel shift over, but when I do that, it looks messed up in FF at all times.

    I don't win.

  9. #8
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    I also just noticed that you are using a lot of "padding-top" "padding-bottom" "padding-left" and so on... I just wanted to make sure that you understand (because I got them confused until just recently), that "padding" and "margin" are different.

    Padding = Empty space from edges on INSIDE of element

    Margin = Empty space from edges on OUTSIDE of element
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  10. The Following User Says Thank You to TheJoshMan For This Useful Post:

    smswetz (08-08-2008)

  11. #9
    Join Date
    Aug 2008
    Posts
    25
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Default

    Quote Originally Posted by Nyne Lyvez View Post
    I noticed in your CSS for the "Footer", you have "margin-top:" set to "-40px".

    By setting it to -40px that will move the element 40px TOWARDS the top
    That was just me plugging things in just to see if it worked. Somewhere in my head it made sense

    Thanks for the padding/margin tip, I often get those two confused.

  12. #10
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    Also, there is a "shorthand" version that will save your fingers and possibly prevent you from getting carpal tunnel syndrome.

    Instead of using:
    Code:
    padding-top:5px;
    padding-right:10px;
    padding-bottom:5px;
    padding-left:10px;
    You could use,
    Code:
    padding:5px 10px 5px 10px;
    That would achieve the same end result. The order is always, "Top" "Right" "Bottom" "Left" when using shorthand.
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •