www.webdeveloper.com
Results 1 to 3 of 3

Thread: <div> container from HTML to external CSS

  1. #1
    Join Date
    Feb 2014
    Posts
    1

    <div> container from HTML to external CSS

    Hey guys,

    For some reason I'm not able to export the <div style="******"> in the body of the index.html to an external .css file.
    I'm lost, everything I tried doesn't work and just makes me end up with a blank page, so any and all help is welcome. :]

    Thanks in advance!

    HTML code:

    HTML Code:
    <!DOCTYPE html>
    <html>
      <head>
    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    	<meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge" />
    	<meta name="viewport" content="user-scalable=yes, width=1000" />
    	<script>
            (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
            m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
            })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
    
            ga('create', 'UA-47766133-1', 'igeekz.nl');
            ga('send', 'pageview');
    
        </script>
        <link rel="stylesheet" media="screen and (min-width: 480px) and (max-width: 960px)" href="index.css" />
        <link rel="stylesheet" type="text/css" href="index.css">
    	<h1>iGeekz - Hulp aan Huis om Problemen op te lossen met uw Apple Producten - iMacs, MacBooks, iPads en iPhones.</h1>
    	<h2>iGeekz - Help at Home to solve Problems with your Apple Products - iMacs, MacBooks, iPads and iPhones.</h2> 
    	<meta name="description" content="iGeekz helpt u aan huis met het oplossen van problemen met, en het beantwoorden van vragen over, Apple apparaten. Of dit nu iMacs, MacBooks, iPads of iPhones zijn.">
    	<meta name="keywords" content="Apple, MacBook, Mac, iPhone, iPad, OSX, iOS, Seminar, huis, home, hulp, help, Mavericks, Mountain, Lion, Snow Leopard, Leopard, Apple">
    	<meta name="author" content="iGeekz.nl">
    	<meta name="robots" content="index, follow">
    	<meta name="revisit-after" content="3 days">
    	<title>iGeekz - Hulp aan Huis voor al uw Apple Producten - iMacs, MacBooks, iPads en iPhones.</title>
      </head>
      <body>
    	<div style ="margin:auto;width:1000px">
    	<div id="index_hype_container" style="position:relative;overflow:hidden;width:1000px;height:1500px;">
    		<script type="text/javascript" charset="utf-8" src="index.hyperesources/index_hype_generated_script.js?61620"></script>
    	</div>
    	</div>
      </body>
    </html>
    Last edited by NogDog; 02-18-2014 at 10:15 AM. Reason: changes [quote] tags to [html] tags

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,337
    I'm not sure that I understand your question, but I do know that you do not want <h1> and <h2> elements inside of your <head> element.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Feb 2014
    Location
    Managua, Nicaragua
    Posts
    45
    I agree with @NogDog, i dont understand why u have the <h1> and <h2> tags inside your <head> tag... The first <div> dont have an ID...

    And inside your css file, u have to have this:

    Code:
    /*reset****/
    *{
    margin:0;
    padding:0;
    border:0;
    outline:0;
    }
    
    /*this is for the first div****/
    div:first-of-type{
    margin:auto;
    width:1000px;
    }
    
    #index_hype_container{
    position:relative;
    overflow:hidden;
    width:1000px;
    height:1500px;
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles