Html help? - Yet ANOTHER Question

Started by Ali, Mon 14/03/2011 17:07:41

Previous topic - Next topic

Darth Mandarb

#20
I was still looking :)  I like a challenge!

I think you're right about the over-flow issue not being the case.  But I think it is [in part] an issue of the margins;

In #main_area you have the width hard-coded to 990px, left = 50% and the margin-left at -495px ... so if the viewport area of the user's browser is <990 (width) it's going push the content off the left side of the screen due to the margin-left offset.  Example: window's viewport width = 800px, the #main_area is set to 50% meaning it's left-most edge sits at 400px in the window, the offset of -495 would push 95 pixels of the main_area off the left side of the screen which the scroll bar ignores.  (conversely this works in the exact same fashion for the height, top, and margin-top designations causing content to be lost at the top rather than the left side).

What I would suggest is a javascript function (in the body onload and onresize) that checks the resolution.  If the viewport width is less than 990px or the height is <630px redefine the CSS to remove the left/top 50% designations and remove the margin-left/margin-top values (as needed - I say 'as needed' because it might not always be necessary to remove both).  This will cause it to just align itself to the top/left of the viewport.

Should solve the problem!  Are you familiar with javascript?

additional - given the height/width you have hard-coded to the design this would only be a problem to people with an extremely low resolution (800x600) or if they don't have their browser window fullscreen).  I no longer develop for 800x600 (personally) and you can never control what size a person makes their browser window so I usually don't worry about that either!  However the javascript I mentioned is a pretty easy thing to implement :)

Ali

Thanks for the explanation! That makes sense.

I've fiddled around with javascript a bit, and though I use a lightbox script for the gallery I am reluctant to use javascript on the homepage. Because it's a portfolio, I don't want a first-time visitor to have to unblock javascript to see the site properly.

I may follow your advice and just ignore it. Who cares what people with low resolution displays think of my site? Low-res is for losers! Am I right AGS community? Anyone?

Thanks for the help, Darth!

Darth Mandarb

Quote from: Ali on Fri 22/04/2011 00:14:13I may follow your advice and just ignore it. Who cares what people with low resolution displays think of my site? Low-res is for losers! Am I right AGS community? Anyone?

Oh man that's hilarious!  I never thought about that before (hating low-res in one area and loving it in another!)  Too funny.  I don't really hate 800x600 but (depending on where you get the stat) it's something like only 5% of users are now still using 800x600 ... while I would rather not alienate these poor unfortunates I'm going to make the site look the best it can for the most people (and I'd wager those using 8x6 are rather used to scroll bars anyway)!

Do you have many people viewing your site that have javascript turned off?  I don't know your situation but I think javascript is pretty widely "on" (again depending on where you get the stat it's supposedly less than 3% who turn it off).  Again I don't know the situation of the users that would/might look at your site.  You'd know better than I!

If you decide to use the onload/onresize option let me know if you need help.  I am a javascript whiz :)

Quote from: Ali on Fri 22/04/2011 00:14:13Thanks for the help, Darth!
You are most welcome.  By the way ... love your art ;)

SMF spam blocked by CleanTalk