Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member Adderall's Avatar
    Join Date
    Apr 2015
    Posts
    1
    Member #
    49200

    Div Center Image

    Hello, i'm new and i want to know how can i center this images:

    http://i.imgur.com/1GEO3Nw.png
    ps. I'm using Dream Weaver.
    Code:
    Code:
    <!doctype html>
    <div id="Banner">
      <html>
      <head>
      <meta charset="utf-8">
      <title>Untitled Document</title>
      <style type="text/css">
    #Header {
    	padding: 10px;
    	height: 50px;
    	width: 1024px;
    	margin-top: 1px;
    	margin-right: auto;
    	margin-bottom: 1px;
    	margin-left: auto;
    }
    #Header {
    }
    #Header {
    }
    #Banner {
    	padding: 10px;
    	height: 200px;
    	width: 1024px;
    	margin-top: 1px;
    	margin-right: auto;
    	margin-bottom: 1px;
    	margin-left: auto;
    }
    #BannerSus {
    	padding: 10px;
    	height: 200px;
    	width: 1024px;
    	margin-top: 1px;
    	margin-right: auto;
    	margin-bottom: 1px;
    	margin-left: auto;
    }
      </style>
      <script type="text/javascript">
    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_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_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 onLoad="MM_preloadImages('images/Navigation Bar/navover_01.jpg','images/Navigation Bar/navover_02.jpg','images/Navigation Bar/navover_03.jpg','images/Navigation Bar/navover_04.jpg','images/Navigation Bar/navover_05.jpg')">
      <div id="Header">
        <p><a href="index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Acasa','','images/Navigation Bar/navover_01.jpg',1)"><img src="images/Navigation Bar/navigationbar_01.jpg" alt="" width="205" height="50" id="Acasa"></a><a href="index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Filme','','images/Navigation Bar/navover_02.jpg',1)"><img src="images/Navigation Bar/navigationbar_02.jpg" alt="" width="205" height="50" id="Filme"></a><a href="index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Seriale','','images/Navigation Bar/navover_03.jpg',1)"><img src="images/Navigation Bar/navigationbar_03.jpg" alt="" width="205" height="50" id="Seriale"></a><a href="index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Desene','','images/Navigation Bar/navover_04.jpg',1)"><img src="images/Navigation Bar/navigationbar_04.jpg" alt="" width="205" height="50" id="Desene"></a><a href="index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Animeuri','','images/Navigation Bar/navover_05.jpg',1)"><img src="images/Navigation Bar/navigationbar_05.jpg" alt="" width="204" height="50" id="Animeuri"></a></p>
        <div id="BannerSus"><img src="images/Ui/banner.png" width="1024" height="200" alt=""/></div>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
      </div>
      </body>
      </html>
    </div>
    Thanks a lot !

  2.  

  3. #2
    Banned
    Join Date
    Mar 2015
    Posts
    21
    Member #
    48461
    This problem does not lie in my ability, sorry, good luck

  4. #3
    Junior Member G33kman's Avatar
    Join Date
    Jul 2013
    Location
    Minnesota
    Posts
    9
    Member #
    36775
    I would try changing your #Banner padding from 10px to padding-top 10px;

    Code:
    #Banner {
    	padding-top: 10px;
    	height: 200px;
    	width: 1024px;
    	margin-top: 1px;
    	margin-right: auto;
    	margin-bottom: 1px;
    	margin-left: auto;
    }
    Let me know if this helps.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:54 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com