homepage Welcome to WebmasterWorld Guest from 107.20.91.81
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
Website on mobile
Not entirely visible
mevanderkuur




msg:4359425
 12:00 pm on Sep 7, 2011 (gmt 0)

My website is cut-off on the sides when viewing on a mobile. Here is my css setup for the container that contains the rest of the website:

#base {
background-color: #FFFFFF;
border: 2px solid #FFCC99;
height: 556px;
left: 50%;
margin-left: -440px;
margin-top: -288px;
position: absolute;
top: 50%;
width: 880px;
}

Is there any change I should make here to make the entire content visible?

When viewing the site on a mac in Safari, when pushing the green "+" shrinks to the viewport you see on a mobile.

 

alt131




msg:4361092
 1:15 pm on Sep 11, 2011 (gmt 0)

Hi mevanderkuur, and welcome to WebmasterWorld.

I expect the problem will be caused by the absolute positioning. There are a number of ways to deal with that, such as using @media, for example. However, as it is the containing div, I would suggest that rather than trying to "fix" the problem created by positioning, a better approach would be to ask whether positioning is required - and if not, remove it.

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