Results 1 to 2 of 2

Thread: simple CSS code / help...

  1. #1
    Join Date
    Aug 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default simple CSS code / help...

    Can anyone write me this code in <div> css to look like the picture ? I've been trying but it never comes out right.......

    http://s8.postimage.org/wkcwq6xx1/adspots.jpg

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    This really is too general and/or too specific, as I doubt you would ever want a page just like that.

    That said:

    HTML Code:
    <!DOCTYPE html>
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <style type="text/css">
    html, body {
    	margin: 0;
    	padding: 0;
    	height: 100%;
    }
    .floated {
    	width: 950px;
    	overflow: hidden;
    	margin: -75px auto;
    	position: relative;
    	top: 50%;
    }
    .floated div {
    	float: left;
    	width: 184px;
    	text-indent: 0.25em;
    	margin: 10px;
    	color: white;
    	background-color: blue;
    	padding: 0.25em 1em;
    }
    </style>
    <!--[if IE]>
    <style type="text/css">
    .floated div {
    	font-size: 98%;
    }
    </style>
    <![endif]-->
    </head>
    <body>
    <div class="floated">
      <div>just some text just some text just some text just some text just some text just some text</div>
      <div>just some text just some text just some text just some text just some text just some text</div>
      <div>just some text just some text just some text just some text just some text just some text</div>
      <div>just some text just some text just some text just some text just some text just some text</div>
    </div>
    </body>
    </html>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •