Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Header not full screen width

Participant ,
Apr 09, 2019 Apr 09, 2019

Hi Guys, I wonder if any of you gurus can help me with something that would probably take me a year, and you ten seconds ; ) - the header on my page is not going across the full width of the PC screen - https://www.mindtraining.net/self-help-hypnosis/business-success/index.php  I'm using the latest version of Dreamweaver.     Any suggestions appreciated!

Cheers,

Craig T

1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 10, 2019 Apr 10, 2019

mindmastery  wrote

Wow, you're right Ben - works fine on my laptop.  It must just be the way it displays on my wider PC monitor?

On wide screens the background image is stuck to the right side of the browser window as a result of background-position: center right; This results in white space to the left of the image. However I guess you have positioned the image to the right on purpose to always have the person on the right in view. If you want the image to consume the width of the browser window

...
Translate
Community Expert ,
Apr 09, 2019 Apr 09, 2019

I do not see a problem, the header stretches across on all of my devices.

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 10, 2019 Apr 10, 2019

Wow, you're right Ben - works fine on my laptop.  It must just be the way it displays on my wider PC monitor?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 10, 2019 Apr 10, 2019

mindmastery  wrote

Wow, you're right Ben - works fine on my laptop.  It must just be the way it displays on my wider PC monitor?

On wide screens the background image is stuck to the right side of the browser window as a result of background-position: center right; This results in white space to the left of the image. However I guess you have positioned the image to the right on purpose to always have the person on the right in view. If you want the image to consume the width of the browser window in all sized screens add background-size: cover, as below:

.active {

height: 450px;

margin-top: 50px;

background-image: url(https://www.mindtraining.net/images/selfhelp-header2.jpg);

background-repeat: no-repeat;

background-position: center right;

background-size: cover;

}

EDITED:

I tend to use media queries to adjust the height of the <div> in wider browser windows so the image doesnt look too thin depth wise and stupid in relationship to other components on the page. So it starts out at 450px by default then gradually decreases. I think you have made adjustements for smaller screens but not as the browser window gets wider.

@media screen and (max-width: 1200px) {

.active {

height: 300px;

}

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 10, 2019 Apr 10, 2019

Many thanks Osgood, very insightful as usual - and has fixed the width issue thank you : )  However, somehow it decreased the height and the mountain was missing (that the guy is standing on) - https://www.mindtraining.net/test2.php​​​  - I changed the 400px height to 300px and it's somewhat better https://www.mindtraining.net/test3.php​​​​ (though still not to the height of the original - https://www.mindtraining.net/self-help-hypnosis/business-success/index.php​  ) - is there any way I could fix this Osgood?    Many thanks again - I am much further along and the problem is now a lot smaller : )

Cheers,

Craig T

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 11, 2019 Apr 11, 2019

I'm not sure why you have the css selector below included in your styles?

.carousel-inner{background-image: width=100%;

background-repeat:repeat-x; height:300px;}

If you dont know why and don't have a reason just get rid of it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 11, 2019 Apr 11, 2019
LATEST

Great stuff.  Did the trick!    Many thanks osgood.

Cheers,

Craig T

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines