Welcome to WebmasterWorld Guest from 54.147.10.12

Forum Moderators: not2easy

Message Too Old, No Replies

Responsive design and ID inside Homepage

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

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Oct 25, 2006
posts: 995
votes: 0


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.
6:04 pm on Apr 30, 2013 (gmt 0)

Senior Member from US 

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

joined:Oct 17, 2005
posts: 4966
votes: 10


This question belongs in the CSS forum.
10:11 pm on Apr 30, 2013 (gmt 0)

Senior Member from US 

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

joined:Apr 9, 2011
posts:12720
votes: 244


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.