[resolved] Cannot change dimensions in custom header image (5 posts)

  1. Andy Hawkins
    Posted 6 years ago #


    I have a very important question...

    I want to use the Twenty Ten Theme as basis for my new portal. But I want to customize the design to meet my needs. I want the whole theme to be 960 pixels wide and changed some settings in the style.css file. But I have a serious problem with the header image. When going to the Custom Header (under Appearances) in the admin menu, I see that the only option is to use 940 × 198 pixels images for my header. As mentioned above I have now changed the styles a little bit to prepare for a custom design, but how can I implement a header image of 960px (width) and 488px (height)if the only option I have is 940 × 198 pixels? I tried with the image I want to use but when the image appears it says that I must crop it to fit in. How can I override that?

    Thank you in advance!


  2. Michael
    Forum Moderator
    Posted 6 years ago #

    check functions.php of the theme around line 105:

    define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 940 ) );
    	define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 198 ) );

    changing the numbers there might solve your problem.

  3. Andy Hawkins
    Posted 6 years ago #

    Hi alchymyth

    Your suggestion worked great. Thanks :)

    I need more help, but it is related to the menu. In Twenty Ten Theme I see the menu right below my new implemented header image, but is there a chance that I can have the menu in the middle of my header graphic like this example?


  4. Michael
    Forum Moderator
    Posted 6 years ago #

    try to add a 'position:relative; top: -150px;' to the style of #access in style.css:

    #access {
    	background: #000;
    	margin: 0 auto;
    	width: 940px;
    top: -150px;
  5. Andy Hawkins
    Posted 6 years ago #


    Your suggestion works very fine. The only thing I had to do is some different settings for my own solution. Again, thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic