I have problem customizing Helix Framework template. I want to change width of the page to lets say 1140 px. If I do it in the framework menu it changes only text field width but all graphics stay full width. How I can make it look like in attachment below?
I know I can use
body {
width: 940px;
}
but it makes mobile version unreliable because there is fixed page width. So it becomes none responsive. Is there better way of editing the code?
Thank you!
If i can fully understand you...
You can try this
.container {
max-width: 940px;
}
UPDATED (comment request)
.body-innerwrapper {
margin: auto;
max-width: 940px;
}
If you would like to add background images for each or separate sections, then see below both screenshots
Example Screenshot1:
Add background image to section in Joomla Template
Example Screenshot2:
Add fixed width to container(within background image) in Joomla Template
1. To making full size background image for any section then use below code (see first 1. To making full size background image for any section then use below code (see first 1. To making full size background image for any section then use below code (see Screenshot1)
#sp-services-wrapper {
background: url('put background image url here') #b64c52 top left no-repeat;
}
2. To add fixed width to any section then use below code (see Screenshot2)
.container {
max-width: 1170px;
}
(or)
#sp-services-wrapper .container {
max-width: 1170px;
}
Just like above example, you may do for rest of each section you created
Related
I'm trying to adjust the images and size depending the page size to doesn't go outside the grid, but I couldn't make it.
I tried add theses lines below in CSS but it bugged the others images
img{
width: 100%;
max-width: 800px;
}
The content should adjust the size of the image, but it isn't working
The image going outside the grid:
You can see the live preview here
Just give max-width for image to 100%
img {
max-width: 100%;
}
do the exact opposite you are doing
img {
width:800px; /* this is optional */
max-width: 100%;
}
OP's comment:
I already dropped it (the width:800px), but it messed with the images at right sidebar.
Then create a class something like img-resposive and for that class apply max-width: 100%. And use that class in images you want/need to
I suggest if you are trying responsive design, use 50em; instead of 800px
They are both equal (except when window is resized.)
I have a custom widget area with the Visual Editor plugin setup so I can do promotions or whatever in the header area.
I have CSS classes for this widget. They control the background img, etc.
My boss told me he wanted the images responsive, but as it turned out what he actually meant is he would like them to crop and re-center as the width of the browser changes. Like in this video home page slider cropping/re-centering, that's taken from the home page.
My header area widget can be seen here - 100daysofrealfood.com/carrot-almond-recipe
As you shrink down the browser, you see the image re-sizes itself appropriately. However, my boss would like it to stay relatively largish so you can still read the text (hence the cropping) but re-center as well.
I inspected the home page and I can see it's a media query that's controlling this, so I tried to use those same things in the .responsive-image I setup in my CSS -
.responsive-image {
width: auto;
max-width: none;
height: 100%;
position: relative;
transition:all .2s ease;
}
This is the code I have in the tester widget I'm doing that's hidden on a private page -
<a href="https://www.100daysofrealfood.com/spring-reset-real-food-mini-pledge-
program/?utm_source=headerwidget"><div class="responsive-image"><div
class="days100-background-header-widget days100-background-header-widget-
image-background"></div></div></a>
And it's just displaying the image totally uncropped. I can't share a link to this because I don't have enough reputation points.
So my question is - how do I accomplish within the div of the widget what's happening on the front page. Is this possible? I tried to do a div-class with the img settings used in the slider and that didn't work either. All of the CSS for this is going in the additional CSS area of the home page so I can't do anything that will impact that. I hope this makes sense! I really appreciate any help/tips/etc. Also please let me know if I need to show any other code snippets.
The thing that you're looking for is background-image.
What you need to do is to use the image as a background inside a container. Then adjust your element via css.
It would look something like :
div.image-background{
position: relative;
background: url('') top center no-repeat;
background-size: cover;
width: 100%;
height: 200px;
}
You adjust the rest as it suits your work.
References:
How TO - Full Page Image
Perfect Full Page Background Image
Using percentage on height/width alone would force the other to stay at proportion and would make it resposive to the browser's width.
example:
.responsive-image {
width: 30%;
position: relative;
transition:all .2s ease;
}
I hope I got your question correclty but if I did this should do.
Thanks to anyone who responds in advance. My website at http://mediaroomhub.com is a full-width website theme. Please how do i reduce the width so that the background picture can show like I have it in the picture? I am not really good at CSS. I tried the following code but it didn't work.
.sec-marg-out, .sec-marg-out2, .sec-marg-out4 {
width: 80%;
}
I want it like this please
Add a specific rule to your #site:
#site {
max-width: 90%;
margin: auto;
position: relative;
}
This overrules the current absolute position of your site (in full screen) and applies a 90% width to it.
I'm making a website using fullPage.js, On the second page (or equivalently, second section) I want to achieve a very simple layout where I have a header fixed on top of the page displaying an image which should be responsive, or decreases in size as the window shrinks but stays at the top.
Currently, I'm wrapping the image to be displayed in a div. I then scale the div fullscreen using,
.post-header {
background: #22BDA0;
max-width: 100%;
height: auto;
}
The img tag inside of the div has a class header-image which I style as,
.post-header .header-image {
max-width: 100%;
height: auto;
margin: 0;
}
However, I'm not getting the desired result. There is a small space on top of the second page which I can't get rid of. You can see the website I'm making along with the source code HERE. Just scroll down to second page, or click Personal Details on the homepage.
Thanks a lot for the help!
What if you just give height:100%; to .section2-container? Will it solve your issue?
Remove display: table-cell; from .fp-tableCell and the padding disappears. Does this need to have display set to table-cell?
fullPage.js has an option: verticalCentered that can be set to false. This seems like a good solution, since the alternative means always trying to ensure that the content of the containing element is always 100%.
My blog/website is iamdonle.com
An example of what I want is 13thwitness.com
The images on mine doesn't scale and a scroll bar will appear. On his website the images get smaller with the window. I'm sure it's simple but I'm a noob. Please help!
You images are scaling down, but your logo is not!
Try:
.logo {
max-width: 100%;
}
First, you'll need to make sure your container is able to scale. Right now it has a set width of 1150px, this needs to be either a max-width or percentage based.
First, remove the width declared on #container and add this CSS:
#container {
max-width: 1150px;
padding: 5px 30px 0;
}
Then you'll need to remove the width declared for your header. You can do this by either removing the line completely (line 82 of your CSS file) or by overriding it in your 'Custom CSS' field box in the Customization screen by doing:
#header {
width: 100%;
}
Then, as others have mentioned, you'll need to add a max-width to your logo as well.
#header img {
max-width: 100%;
}
Note: when I viewed the blog you were using the "Quite Big" theme, the code above only applies to that theme.