CSS Logo Size

Discussion in 'CSS' started by xxll_martin_llxx, Jul 3, 2012.

  1. #1
    Alright folks,

    I've just changed our forums theme - MYBB software - so that it condenses and expands with whatever the users screen resolution is.

    I've got a question....
    Is this the best way to have it coded:

    #logo {
    	
    	height: 100px;
    	text-align: center;
    	margin: 0;
    	padding: 0 15px 10px 15px;
    }
    
    .logo {
    	width: 100%;
    	height: 100px;
    	position: center;
    	margin-top: 0 px;
    	margin-right: 0;
    	margin-bottom: 0;
    	margin-left: 0;
    }
    Code (markup):
    
    <div id="logo">
    		<a href="{$mybb->settings['bburl']}/"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" class="logo" /></a></div>
    Code (markup):

    My question is... Is there a way to make the logo a correct size so that it looks ok on all screen resolutions??

    http://www.phoenixsupras.net
     
    Solved! View solution.
    xxll_martin_llxx, Jul 3, 2012 IP
  2. MarkTheUser

    MarkTheUser Member

    Messages:
    206
    Likes Received:
    0
    Best Answers:
    4
    Trophy Points:
    26
    #2
    You can define the logo size to something static like 100px instead of 100% and it wont get streched and will look as it should on all screen sizes.
     
    MarkTheUser, Jul 3, 2012 IP
  3. #3
    You have 2 options one is make logo size which you want.
    Or
    Give the width of the logo not a height..
     
    ashishkg, Jul 5, 2012 IP
    xxll_martin_llxx likes this.