Welcome to WebmasterWorld Guest from 54.158.25.146

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 10+ Year Member Top Contributors Of The Month

joined:Oct 25, 2006
posts: 1043
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: 5003
votes: 20


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 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:13841
votes: 485


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.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members