Log In · Register

 

Resource Center Links


This Month's Contests | Hosts Looking for Hostees | Hostees looking for Hosts | Big Book of Resources

Submission Guidelines

Variable Screen Resolution Centring
Variable Screen Resolution Centring
You cannot see the results of the poll until you have voted. Please login and cast your vote to see the results of this poll.
Total Votes: 9
Guests cannot vote 
HeartOfPandora
post Aug 25 2008, 02:20 AM
Post #1


i like boobies, yes I do. I like boobies - how 'bout you?
*****

Group: Member
Posts: 620
Joined: Jun 2008
Member No: 662,457



I've seen a lot of layouts on CB that I like, but I'd like them a lot more if they were centred in my screen resolution (1280x800). It just looks funny to have a layout on the left of my screen when it's in the centre of a smaller resolution. I understand that those people are centring for 800x600, but it ain't that hard to centre it for all screen resolutions. Professional websites do it, loads of people on CB do it, hell even I do it when the layout calls for it (and I'm really lazy).

I dunno, I'm just whining about something I think every coder should know, I guess. It's 2am *lol*, what do you expect?

Not that hard to centre things, really. Take a 400x200 image banner:

CODE
#class {
position: absolute;
left: 50%;
margin-left: -200px;
...
}


Bam, it's in the centre of every screen. :] Putting something directly in the centre of a screen is easy, just set "left:;" to 50% and "margin-left:;" to exactly half of the width of whatever you're centring. You'd have to play around with the margin a bit more for things that are to the left or to the right of the centre line, but all you have to do is increase or decrease it depending on which side you want it to go to. Check for major browser compatibility (IE, Firefox, Opera...) and you're set!

Enough sleepy ramblings, anyone out there agree or are ya'll sleeping?
Reason for edit: Use [code] not [codebox] for smaller codes. Thanks. :) - Gabi
 
 
Start new topic
Replies
schizo
post Aug 25 2008, 04:11 PM
Post #2


Senior Member
******

Group: Staff Alumni
Posts: 2,435
Joined: Feb 2007
Member No: 506,205



Moved to Designer's Cafe.

I agree with you when it comes to certain layouts, but there are others that the designer envisioned to be on the side. If the designer purposely aligned it to the side, then that was their design choice and you can't really criticize that. If someone just doesn't know how, then that's a problem. I'm surprised by how many people really don't know how to center their layouts. That question always comes up in the Myspace Support forum and PMs and messages I get.
 

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: