Domanda

I have a blog that I've been working on: calacino.tumblr.com. On the top left, I wrote a code for a bubbletab, which opens up and has some information. In that bubble tab I added scripts that update automatically. There is one 'date' script and one 'webpage-views' script. I wanted to change the color of the script.

Here is the code for the date script: [The webpage-views script is nearly the same]

` date:

<style type="text/css">
   div#scripteddate a 
   {
      color: #08B9FF;
      display: inline;
   }
   </style>
   <div id="scripteddate">
   <script src="http://freehostedscripts.net/date2.php"></script>
   </div>  

` The section at the top sets 'date:' to the color black:

<span style="color: #000">date: </span>

Where as the section on the bottom, sets the script which gives a number to a blue color.

<style type="text/css"> div#scripteddate a { color: #08B9FF; display: inline; } </style> <div id="scripteddate"> <script src="http://freehostedscripts.net/date2.php"></script> </div> However, I've run into the problem that this code causes a line-break between the word 'date' and the script itself:

http://i.imgur.com/vDirmRG.png


I'm trying to find a way to get rid of the line-break between 'date:' and the scripted number and 'hits:' and its scripted number.

È stato utile?

Soluzione

You need to use display: inline in your div not in your a element :

div#scripteddate {
   display: inline;
}

Because div element is a block-type so it's normal that it does a line-break.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top