Jump to content

BTEC IT Unit 20 - Website Design/HTML/Embedded Twitter Feed

From Wikibooks, open books for an open world

Twitter Button

<head>
<style>

a.twitter-timeline {
  /* Make the link look like a button */
  display: inline-block;
  padding: 6px 12px 6px 30px;
  margin: 10px 0;
  border: #ccc solid 1px;
  border-radius: 3px;
  background: #f8f8f8 url("https://upload.wikimedia.org/wikipedia/en/thumb/9/9f/Twitter_bird_logo_2012.svg/944px-Twitter_bird_logo_2012.svg.png") 8px 8px no-repeat;
  background-size: 1em 1em;

  /* Text */
  font: normal 12px/18px Helvetica, Arial, sans-serif;
  color: #333;
  white-space: nowrap;
}
  /* Hover effect */
a.twitter-timeline:hover,
a.twitter-timeline:focus {
  background-color: #dedede;
}

/* Color Highlight for keyboard navigation */

a.twitter-timeline:focus {
  outline: none;
  border-color: #0089cb;
}
</style>
</head>

<body>
<!-- change the https://twitter.com/NUS_USI with your own URL -->
<a class="twitter-timeline" href="https://twitter.com/NUS_USI">Tweets by NUS_USI</a>
<br>

</body>


Twitter Timeline

<head>
</head>

<body>
<!-- change the https://twitter.com/WokingComputing with your own URL -->
<a class="twitter-timeline" data-width="220" data-height="500" href="https://twitter.com/WokingComputing">Tweets by WokingComputing</a>
<script>
!function(d,s,id)
{
	var js,fjs=d.getElementsByTagName(s)[0],
	p=/^http:/.test(d.location)?'http':'https';
		if(!d.getElementById(id))
		{
			js=d.createElement(s);
			js.id=id;js.src=p+"://platform.twitter.com/widgets.js";
			fjs.parentNode.insertBefore(js,fjs);
		}
}

(document,"script","twitter-wjs");

</script>
</body>