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
- Programmatically get images by URL and save in uploads folder
- Why WordPress automatic cropping all my images?
- is it possible to replace the use of gd_lib with imagick or ImageMagick?
- get images from post and make a zip
- Function to call the attachment image from post
- Default image for homepage when shared in social media
- Filter Media Library by author or post_parent
- How to grab first image attached to post and display in RSS feed?
- How to add a link in a image’s caption?
- Can’t Display Featured Image in RSS Feed
- Get URLs for All Sizes of Image via Admin Panel
- Automatically Add Caption in image
- Add custom HTML to posts page
- How to Optimize images after uploading all images to WordPress Site?
- How to get relative URL of medium sized featured image?
- What’s the best “insert all images” plugin?
- Image Quality Thumbnail Compression in WordPress?
- Gutenberg editor get post featured image by id
- Local WordPress installation doesn’t crop images
- Get full URL of images in media library including http://
- Host images only on CDN
- Stripping the_content() from images then displaying them seperately
- Default Image Link Type Setting not Working
- Fallback for missing srcset images
- max_srcset_image_width doesn’t work as intended
- Background image resets after time (XAMPP)
- Custom thumbnail size of image when uploaded
- How can I add a ‘Click to Enlarge Image’ feature, with the enlarged image opening in a popup?
- Add custom metabox to media library images
- Is there a resolution limit in image resize?
- How to display original unmodified thumbnail
- One picture belonging different galleries?
- Setting default image size
- How can I make an image full width inside a paragraph which is 70% (text) [closed]
- Images uploading from media going in wrong folder
- Row background image not showing in mobile browser served from wamp local host
- How does wordpress name resized image copies?
- adding image to post thumbnail from another server
- Pagination between images (active/inactive)
- Web App mode leaves users stranded when following image links when using WPTouch with W3 Total Cache [closed]
- How to get rid of undefined variable in previous post image
- My authors need to be able to preview their upload images and manipulate and scale
- Why does WordPress list all image sizes in srcset even if they’re larger?
- Lazy Loading of all Images
- wp_get_attachment_image – enable width and height attributes for an SVG image
- Register an embed handler for self hosted images
- still need help-images inside wp-content/ uploads/ are not showing up in my media library and uploaded using FTP protocol
- Get image thumbnail size urls in media library
- WordPress is showing blank lines instead of images
- Export wordpress image ID based off keyword search
- js alert in add_filter function for image_send_to_editor
- Post Images are not showing up whenever I use shortCodes in my posts
- How to get large size of a post’s image?
- WordPress Images Are Not showing After Changing Directory Name
- Adding a URL Parameter to JPEG images in posts
- How to use lossless compression with WP_Image_Editor
- all images of past post messed up after changing theme
- image_send_to_editor filter – Unwanted paragraphs and line breaks
- Edit image itself
- Url link to feature image in the portfolio [closed]
- Where is this folder [closed]
- Different image heights for different resolutions without distortion
- Get the name of an image [duplicate]
- Get an array containing ONLY post IDs of attached images
- Exporting a portfolio with pictures
- Protocol relative url not pulling up images on IE, FF, and OPERA
- Making a thumbnail if there exist a link with. jpg or .png extension in WordPress
- Transfered live site to new server and images are not showing
- Limit files uploaded per folder
- Aviary + WordPress Media
- How do you hide images from posts only
- Issues with the excerpt (wordcount/HTML/images)
- Display image title and caption inside a single post
- WP is showing wrong image dimensions
- Bug when uploading pictures with Arabic name characters?
- How to get the attribues (alt and title) of an image import with ACF [closed]
- WordPress can’t get image url but both the attachment and the actual file are there
- How can I use an image from an external source without uploading it to the media library
- changing option for all posts
- Customize all image captions