Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
This site: http://www.samuelgrant.co.uk
This is exactly the kind of setup I want to build. I'm stuck, however, at figuring out how the maximum width of this site is being set. I want a centered main content area like this site has with the background stretching to full browser width. Can anyone enlighten me? Relative newbie here...any help would be appreciated. Thanks!
HTML
<div class="container">
<div class="inner-w">
Stuff in your inner column
</div>
</div>
CSS
body {
margin: 0;
}
.container {
background-color: #f06;
}
.container .inner-w {
max-width: 50em; /* or 400px etc */
margin-right: auto;
margin-left: auto;
}
a jsFiddle that also shows this column width - and how it can be different in each sections etc.
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I'm trying to create the headline section on www.dzn-studios.com full height, only when on desktop.
Though when I try and adjust the height: with a '%' value there is no effect. If I enter a pixel value that does change the height but ruins the responsiveness.
Desired outcome
Apologies for the newbie question but we all have to start somewhere right!
You would add this declarations to your css rule for header.section-headline.homepage
.section-headline.homepage {
height: 100vh;
margin-top: -80px;
}
If I've understood your question correctly percentages aren't working.If this is the case you may need to set a 100% height on all your parent elements, in this case your body and html.
example:
html, body { height: 100%; width: 100%; margin: 0; }
div { height: 100%; width: 100%; }
if this isn't what you're asking please be more clear and i'll edit my answer
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
I am rather new at coding websites and am having a little difficulty coding this website.
Note: I have uploaded 2 pages onto my business website to demonstrate my problem. Please don't click on the links as they will not work properly.
The home page is working fine www.dbayliss.com/rshome.html, but I am having trouble with the contact page www.dbayliss.com/contact2.html.
As can be seen the container or wrapper what ever you want to call is is not holding the content of the contact page. I have the container's height set to 100% which is working for the home page just not the contact page.
Here is the CSS.
Removing top: 50px; from style2.css line number 25 seemed to have moved the logo into the container. Since header is already inside container, you do not have to offset the header by the 50px.
#contact {
width: 400px;
height: 282px; //change to 800px or more
position: absolute; //change to relative
top: 90px;
left: 150px;
color: #000;
font-family: 'Noto Sans', sans-serif;
text-align: left;
font-size: 14px;
display: block;
}
when position set to relative, it sets the element out of your container so your container doesn't get actual height
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I want that the blue box at link is displayed the full width of the white area, the content...
code:
.info {
background-color: #3498db;
padding: 10px;
color: #fff;
font-weight: bold;
position: absolute;
z-index: 10;
}
thank you for your help...
You can set the width of 100%, this should be the full width of the content area...
Try this JQuery code:
var s=$('#content').width();
document.getElementById('home').style.width=s;
By using Inspect Element i found that #content is your parent(white background) div and #home is your div you want to adjust the width to the width of #container.
If its info class write:
var s=$('#content').width();
$('.info').css({'width':''+s+'px'});
If you want the blue content on 100% of #content, you should remove the padding on #content.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I've been searching everywhere and trying many things myself as to how I could possibly align DIVs horizontally. I'm probably thinking this in the wrong way but I could love to recreate this inside a web browser that will fit itself to the user's browser size, and when brought down to a certain size, such as an iPhone or other smart phones, it would change to another layout.
Here is an example of what I mean.
Thanks for your help!
For putting divs next to each other you are going to want to use float: left;
<div id=container>
<div class="section"></div>
<div class="section"></div>
<div class="section"></div>
<div class="section"></div>
</div>
Then in css:
#container {
width: 1000px;
}
.section {
position: relative;
float: left;
width: 248px;
border: 1px solid black;
}
Here is an Example
If you want things to be responsive there are a couple different options depending on what you want to do. The most effective way is probably to look in to the #media tag. Link
UPDATE:
Here is another example where the divs will automatically scale to the browser width.
Example
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am trying to create a web page that looks like like in this site:
I tried creating an image with that design(the one in the middle with a white background and pointy edges on the top and bottom) but the result is that the image is static and does not dynamically change when the content of the page changes.
I do not know if I can implement the design by customizing the <div> borders or upload the design as a background image then dynamically create it.
Thanks for all the help.
If you don't want to use CSS3 (for more browser support) use the following structure:
<div class="conatiner">
<div class="pointyHeader"></div>
<div class="content">
your dynamic content here
</div>
<div class="pointyFooter"></div>
</div>
where pointyHeader and pointyFooter have a fixed height and background image.
Working jsFiddle
I thought of a .box { position: relative; }
and a .top { position: absolute; top: 0; } and same with bottom .bottom { position: absolute; bottom: 0;}
check it here: http://jsfiddle.net/DyG8F/