height


Margin not showing with 100% width & height


I was trying to build myself a portfolio site. When I thought I was about to finish building the basic template, the margin and media queries stuff totally drove me crazy.
Here is my temporarily hosted domain, www.kenlyxu.com/portfolio_new
I made the pages fit to whatever browser size by using
html, body {
margin:0;
padding:0;
width:100%;
height:100%;
I'm trying to make 10px margin on all side and on every page so that I use this container.
#thecontainer {
margin: 10px;
background-color: #f29e28;
height: 100%;
width: 100%;
}
#workcontainer {
margin: 10px;
background-color: #f29e28;
width: 100%;
}
I hope the end result would be like orange background with white margins on all sides. When seeing my site on the desktop, the margin-right and margin-bottom not showing. They only show when I use width: 98.5%;
Also, the orange background color should expand according to the size of browser. On the iPhone 5 portrait view, the orange background does not extent the bottom part. I tried to use some standard media queries for it, but I don't know what values should I give to each of the mobile devices.
Try
Position:fixed;
in
# thethecontainer
now your code looks like
#thecontainer {
margin: 10px;
background-color: #f29e28;
height: 98%;
position:fixed;
width: 98.5%;
}

Related Links

How to set height to 100% of element with position fixed depending on its wrapper height
Video height won't work
change line height in sublime text default theme after changing the font-size
How to have autogrow children with flexbox?
Kalman Filter for height and acceleration
Isotope last items in row with equal height
How to set the detail height programatically in ActiveReports
Looking for a way to change the fixed height of page header in Access 2007
CSS Background image not showing with height auto
Binary Tree find height of a specific Node
Re-size the Text and Button/Label in Livecode
Overlay a background image onto the web page
WooCommerce - change price based on product_id, width and height
Susy gallery breaks height for display table and table-cell
Flex Slider full height and width without stretching
mPDF set Height for SetHTMLHeader

Categories

HOME
vue.js
ember.js
cil
numpy
mql4
avro
laravel-5.2
safari
azureservicebus
rebol
schemacrawler
docker-windows
vsftpd
httpclient
flexbox
getorgchart
ida
ejs
aspell
zoomcharts
boolean-expression
jni
raphael
apple-tv
sumo
widevine
metadata-extractor
upnp
pygooglechart
exponential
expand
recurrence-relation
powershell-remoting
remote-server
vsts-package-management
autocompletetextview
redhat-datavirt
sonarqube-scan
s3cmd
tic-tac-toe
socketscan
code-composer
xbim
prototypejs
startapp
amazon-machine-learning
persistent
spell-checking
udev
jexl
etherpad
fedora20
pycurl
festival
master
alter
backstop.js
mailcatcher
wcf-ria-services
foxit
gherkin
spring-repositories
mongo-c-driver
mpeg-4
plone-3.x
data-import
retro-computing
webhdfs
twython
shift-jis
scrollspy
epl
searchkick
low-level
google-earth-plugin
hana-xs
cpan
c++-actor-framework
x-ua-compatible
cg
sgml
lumx
joox
slick-2.0
broadcasting
jquery-tabs
confusion-matrix
nsmatrix
graph-coloring
xml-libxml
wpdb
phpsh
mozart-mvc
lync-server-2010
ubuntu-11.10
blockingqueue
ubuntu-11.04
path-manipulation
nsindexpath
webkit-transform
clause
hardware-acceleration
external-assemblies
idictionary
castle-validators
gears
standardized

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App