Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20
  1. #11
    Join Date
    Mar 2009
    Location
    Western Australia
    Posts
    386
    Tokens
    0

    Default

    When I looked at the source you're tags showed like this:
    HTML Code:
    <span class="tags">
    
              <i> <a href="http://www.adamwingie.com/tagged/tag">tag</a></i>
    
           
    
              <i> <a href="http://www.adamwingie.com/tagged/tagging">tagging</a></i>
    
           
    
              <i> <a href="http://www.adamwingie.com/tagged/tag">tag</a></i>
    
           
    
              <i> <a href="http://www.adamwingie.com/tagged/test">test</a></i>
    
           </span>
    This doesn't work because that is in one class, it would need to be like:
    HTML Code:
    <span class='tags'><!-- Tag 1 --></span>
    <span class='tags'><!-- Tag 2 --></span>
    <span class='tags'><!-- Tag 3 --></span>
    Edit: On Tumblr go to Appearance >> Custom HTML and find (Ctrl+F) something in the css part of the page that refers to "tags", copy and paste and then post here.
    Last edited by Shibby-Shabs; 11-07-2011 at 01:12 PM.

  2. #12
    Join Date
    Dec 2007
    Location
    Manchester
    Posts
    2,236
    Tokens
    118
    Habbo
    hamheyelliot

    Latest Awards:

    Default

    Quote Originally Posted by Shibby-Shabs View Post
    This doesn't work because that is in one class, it put need to be like:
    Not necessarily, each tag can then be defined as .tags a so this next snippet should work:

    First take the tags out of <i> tags and we'll italicize them in the css.

    Use

    .tags a {font-style: italic}
    .tags a:nth-child(1) {color:#111111}
    .tags a:nth-child(2) {color:#111111}
    .tags a:nth-child(3) {color:#111111}
    .tags a:nth-child(4) {color:#111111}

    and go on for as long as you need replacing the colours.

  3. #13
    Join Date
    Mar 2009
    Location
    Western Australia
    Posts
    386
    Tokens
    0

    Default

    Quote Originally Posted by elliot View Post
    Not necessarily, each tag can then be defined as .tags a so this next snippet should work:

    First take the tags out of <i> tags and we'll italicize them in the css.

    Use

    .tags a {font-style: italic}
    .tags a:nth-child(1) {color:#111111}
    .tags a:nth-child(2) {color:#111111}
    .tags a:nth-child(3) {color:#111111}
    .tags a:nth-child(4) {color:#111111}

    and go on for as long as you need replacing the colours.
    I see what you mean, I think, but what I mean is each separate tag would need to be in a difference <span class='tags'> otherwise if there all in one then the colour would remain.

  4. #14
    Join Date
    Dec 2007
    Location
    Manchester
    Posts
    2,236
    Tokens
    118
    Habbo
    hamheyelliot

    Latest Awards:

    Default

    Quote Originally Posted by Shibby-Shabs View Post
    I see what you mean, I think, but what I mean is each separate tag would need to be in a difference <span class='tags'> otherwise if there all in one then the colour would remain.
    They wouldn't need new spans, because there are individual <a> tags within the span tags which seperate themselves from each other, that's why you can use .span a combined with the nth-child property.

  5. #15
    Join Date
    Mar 2009
    Location
    Western Australia
    Posts
    386
    Tokens
    0

    Default

    Ok, of course, I was missing the "a" when I was reading it. +rep too because as apart of my confusion I read about nth-child on w3schools and learnt something

  6. #16
    Join Date
    Dec 2006
    Location
    Doncaster, UK
    Posts
    1,251
    Tokens
    5,249

    Latest Awards:

    Default

    Quote Originally Posted by elliot View Post
    They wouldn't need new spans, because there are individual <a> tags within the span tags which seperate themselves from each other, that's why you can use .span a combined with the nth-child property.
    Got it working, thanks a bunch you two - very helpful!

  7. #17
    Join Date
    Mar 2009
    Location
    Western Australia
    Posts
    386
    Tokens
    0

    Default

    You sure did and it looks great, nice job man!

  8. #18
    Join Date
    Jul 2004
    Location
    California
    Posts
    8,725
    Tokens
    3,789
    Habbo
    HotelUser

    Latest Awards:

    Default

    I took a Javascript approach to this, and wrote the following short function:

    Example: http://develop.davzy.com/test3.php

    HTML Code:
    <html> 
    	<head> 
    		<script> 
    			function setColour(selectorid,word,colour)
    			{
    			var content = document.getElementById(selectorid).innerHTML;
    			document.getElementById(selectorid).innerHTML = content.replace(word,'<span style="color: ' + colour + '">' + word + '</span>');
    			}
    		</script> 
    	</head> 
    	<body> 
    		<div id='randomdiv'>
    		        This is an example of some test you want different colours.
    		</div>
    		<script>
    			setColour('randomdiv','test','orange');
    			setColour('randomdiv','different','red');
    			setColour('randomdiv','example','pink');
    		</script>
    	</body> 
    </html>
    I'm not crazy, ask my toaster.

  9. #19
    Join Date
    Dec 2006
    Location
    Doncaster, UK
    Posts
    1,251
    Tokens
    5,249

    Latest Awards:

    Default

    I knew it'd be easily possible in Javascript but I really don't want use it. I believe CSS is the better language of the two.

    Even still though, that wouldn't fit a dynamic model, would it? With no set words as it changes for every post.

  10. #20
    Join Date
    Jan 2006
    Location
    Kent
    Posts
    987
    Tokens
    0

    Default

    Glad you got there in the end nth-child is really quite useful
    This is our situation and we're happy to be here,
    I wouldn't change this place for anything.


Page 2 of 2 FirstFirst 12

Posting Permissions

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