Welcome to WebmasterWorld Guest from 54.227.110.209

Forum Moderators: not2easy

Message Too Old, No Replies

Responsive design and ID inside Homepage

     

toplisek

2:28 pm on Apr 30, 2013 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



I have set responsive layout. How to set in the correct way body element like:
<body id="myhome">

CSS:
body#myhome {
padding-top: 90px;
}
to work in all dimensions?
I'm using twitter.github.io/bootstrap/

I'm not sure but 1024x768 works without top area (padding) which is correct but all other lower dimension will add padding and showing design in the wrong way.

Is it possible that bootstrap works detects Homepage and is not working in the local based testing?

Need help.

Fotiman

6:04 pm on Apr 30, 2013 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



This question belongs in the CSS forum.

lucy24

10:11 pm on Apr 30, 2013 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



While you're at it, can you explain
<body id="myhome">

?
Normally an id is used when there can be several of the same thing and you need to identify a specific one. But in the case of <body> there is always exactly one, no more and no less. And it will contain the entire visible part of the page. So the javascript shouldn't need any further help finding it. (This is assuming there is in fact some javascript involvement, since this is the js forum.)

In a shared css you might have a body.class for different overall body types. Interesting mental image there. But if a particular <body> occurs only once on the entire site, it doesn't belong in shared css at all.