Why is this right aligned?

Discussion in 'HTML & Website Design' started by Kiri, Mar 25, 2009.

  1. #1
    You can see here http://www.distinctionsmag.com/ the "Recent Articles" text under the gallery is right aligned. It uses the same css as the "Featured Videos" next to it which is centered like it should be. I've even tried setting it with <h4 align="center"> but it does nothing. Even setting it as left in css and html does nothing?

    Any ideas?
     
    Kiri, Mar 25, 2009 IP
  2. Tuomas

    Tuomas Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Do you have your h4 code defined in your css? If not try this:

    
    
    h4 {
    text-align: center;
    }
    
    
    Code (markup):
    Hope that helps:)
     
    Tuomas, Mar 25, 2009 IP
  3. Kiri

    Kiri Peon

    Messages:
    57
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Nope that doesn't work.

    I might add the test that displays is generated from a php function that takes the category id and turns it into the category name. That may have something to do with it.
     
    Kiri, Mar 25, 2009 IP
  4. emed

    emed Peon

    Messages:
    70
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    add width:100%; in the .posts section on the file
    http://www.distinctionsmag.com/wp-content/themes/metro_10/style.css

    .posts {
    	background: #FFFFFF;
    	float: left;
    	margin: 0px 0px 10px 0px;
    	padding: 10px;
    	display: inline;
    	[B]width:100%;[/B]
    	}
    Code (markup):
     
    emed, Mar 25, 2009 IP
  5. chuckymcgun

    chuckymcgun Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Why don't you give it it's own class?
     
    chuckymcgun, Mar 25, 2009 IP
  6. chuckymcgun

    chuckymcgun Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Whoops... nevermind, looks like emed solved it. Good Job emed!!

    Chucky
     
    chuckymcgun, Mar 25, 2009 IP
  7. Kiri

    Kiri Peon

    Messages:
    57
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks guys it worked, could one of you explain what was going on?
     
    Kiri, Mar 25, 2009 IP
  8. emed

    emed Peon

    Messages:
    70
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #8
    the div posts was bigger than it should, so the buttons and some text was hidden and thats why the title seems to be right aligned
     
    emed, Mar 25, 2009 IP