homepage Welcome to WebmasterWorld Guest from 54.204.168.212
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Responsive design and ID inside Homepage
toplisek

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4569494 posted 2:28 pm on Apr 30, 2013 (gmt 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.

 

Fotiman

WebmasterWorld Senior Member fotiman us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 4569494 posted 6:04 pm on Apr 30, 2013 (gmt 0)

This question belongs in the CSS forum.

lucy24

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



 
Msg#: 4569494 posted 10:11 pm on Apr 30, 2013 (gmt 0)

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved