NimChimpsky
NimChimpsky

Reputation: 47280

css layout width of <body> reduced compared to <html>

My web page content is being shifted to the right, when I debug using chrome it shows the width of tags as :

<html> : 1280px
<body> : 1264px
<all my divs> : 1264px

Although I am setting width to 100%. It matters not which browser I use.

(yes I have a small screen)

Upvotes: 0

Views: 92

Answers (3)

Khairu Aqsara
Khairu Aqsara

Reputation: 1310

try with this one

* {
    padding: 0;
    margin: 0
}

Upvotes: 0

Quantum
Quantum

Reputation: 1476

If you use a borwser reset for the css you can avoid things like this.. This one is my favs http://meyerweb.com/eric/tools/css/reset/

Upvotes: 2

jshawl
jshawl

Reputation: 3483

try this

body {
  margin:0;
  padding:0;
}

Upvotes: 2

Related Questions