The header image is already set to 100% width by default. Check lines 571-578 in style.css of the twenty fourteen theme
#site-header img {
max-width: 100%;
}
If you need a bigger header, you’ll need to set the sizes accordingly in the code in your question, which I suppose you got from one of my previous answers 🙂
Just another note here, you can play around with the max width of site-header
found in lines 847 to 853.
.site-header {
background-color: #000;
max-width: 1260px;
position: relative;
width: 100%;
z-index: 4;
}
You need to set max-width: 1260px;
to your set width in your function
Related Posts:
- Display different header images based on current page
- How to place an image into header.php? [closed]
- Images in the Twenty Fourteen theme
- How can I use cached images in an AJAX response?
- WordPress 4.1 header image problem
- How do I get my main image to stretch the full length of the screen?
- How to remove header images from displaying (not css or editing)?
- Logo is not being displayed in header (Twentytwelve)
- Placing a featured image into header
- Featured image not shown in header
- Responsive header image
- How can I change the header on the pages?
- Change header image size
- Adding custom html/css/images to Theme
- How to add an image below the header on homepage
- Put image onto header
- Changing image size displayed in wordpress twenty fourteen theme
- Changing logo image in header.php upon language detection
- How to get customable image header?
- WordPress Site Broken and it gives Headers Already sent error
- get attachment title based on attachment id
- Media Upload Folder – how to manage
- Wrong image dimensions in Insert Media after add_image_size()
- PHP Fatal error: Call to undefined function download_url()
- Upload multiple images in a custom metabox
- How can I hide media library images from general users?
- Strange img srcset behaviour
- Images uploading to wrong folder
- set_post_thumbnail_size not cropping featured images, but reducing proportionally
- Upload images using FTP and show them in media
- Applying class to links around self hosted images embedded to posts/pages
- Has wp_get_attachment_image_src changed from 3.2.1 to 3.5.2?
- How to Make WordPress Default gallery responsive on mobile?
- Why does wordpress generate more thumbnails than the 3 standard sizes?
- WordPress Child Theme Calling Images
- including image assets in widget
- Link Featured Thumb to Attachment Page, If Possible
- Get all post media images via WP REST API
- Is there a shortcut to change bulk BMP images to JPG images in a site?
- Change image size when inserting Media?
- WordPress Post featured image URL in the header
- Add instructions to featured image
- HTTP Error when uploading files above 7mb unless using GD Image Editor
- Image resize using url parmater
- Get image URL after image created from canvas and sent to WP uploads with AJAX
- Resize header image
- Retrieve image from content, assign it as a featured, and then remove it from the content
- Custom Loop, Match Category with Page: How to display post featured image?
- Modifying the HTML Output of Inserted Images
- Include an image within auto the_excerpt?
- Google verification challenge with file location
- Remove height attribute from wp_get_attachment
- How do I retrieve an image’s width and height using Advanced Custom Fields?
- wp get attachment image always gives me thumbnail
- Images are not showing after moving WordPress installation from server to localhost?
- Images are not showing up in “Uploaded to this post”
- A little confused as to what add image size actually does
- Get thumbnail URL :)
- Right click© images: protection
- Cache DB queries result
- Remove “%” from strings in serialized arrays in wp_postmeta
- Images not found after migrating WordPress website
- Error uploading images in wordpress
- Disable Media File Image Link On Mobile Devices
- Set two default featured images
- How to insert image path in database to display product image in wp-admin?
- Apply nextgen-gallery lightbox effect [closed]
- How can I externally retrieve a post’s custom sized image
- Page speed error: “serve scaled images”
- View photo album without having to scroll down for each picture
- How can i sorting and display image order by siz in media library?
- x2 images for retina?
- Save media files (images) to database instead of the filesystem
- i want to change URL of WordPress image or rewrite in runtime
- Load url image full size in thumbnail, medium, large size
- A query to substitute images paths in gutenberg (website migration)?
- WP Large Images crash page
- WordPress can’t detect any thumbnails size?
- Remove image border in twentyeleven theme [closed]
- Twenty Fourteen: Unsticky header after making header bigger
- How to display posts with images in fullscreen slider
- 403 Forbidden when accessing image in wordpress
- Why doesn’t WordPress make thumbnails for videos?
- For what does WP generate Thumbnails?
- Images are not shown
- Thumbnail gallery by date and taxonomy
- Adding multiple images on my site – without using plugins [closed]
- Remove the height limit on wordpress 3.4.2
- > added to images link in WordPress
- Image media upload problem in page editing modus?
- Thumbs and pictures not showing anymore
- Is there a good way to use CMS images with CSS
- Upload image from other server without resize?
- Images will not attach to posts after site migration
- How to access & display images from a post without textual content ( and vice versa) according to best wordpress practices
- Forcing absolute src links in the RSS feed
- where is images/image.jpg?
- Using the on-board image editor for featured images: edits are not being used
- What type to upload image within theme options?
- Uncaught Error: Call to undefined function file_is_valid_image()