473,473 Members | 1,826 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Negative margins content dissaper at left

125 New Member
Hi

If you use negative margins to center a page page and if the screen is small the content get hidden outside the screen(window) at the left side and you cant scroll to it.

Is it a common workaround for that or do you just use another centering method. (like margin: auto thingy)
Dec 18 '08 #1
4 2439
clain
79 New Member
we do not use negative margin for centering... if some one asked to do that .. then ist wrong... and negative margins will lead to such phenomena such as going into screen..

what exactly you need?
Dec 19 '08 #2
asedt
125 New Member
@clain
I still see a lot of people that do, and I don't like it and can't see the page when i have a smaller screen (one of my laptops).

I was wondering if their was a good way to use negative margins, or if my recommendation to use margin: 0 auto instead is the only way to go?

Negative margin centering was originally used by Jon Hicks in his Zen Garden submission, and is in literature by Dave Shea and Molly E Holzschlag (The Zen of CSS design) and I think many use it before they learn anything else. Who do you mean by WE? Best practice?

Is there no workaround to make the content not go out of the window??
Dec 20 '08 #3
drhowarddrfine
7,435 Recognized Expert Expert
@asedt
Well, I hope not, but negative margins are a very helpful technique.

I'm out of town so I can't help but you brought up an interesting problem I'll have to look at when I get back Sunday night.
Dec 20 '08 #4
asedt
125 New Member
The standard example is this page:

CSS Centering: Negative Margin

If you make the browser window smaller than 500px content is to far to left so you can't se it any more.


And when you use you eee pc or other small screen and se this in real web pages it's not so funny, if you a web designer you can change the CSS on what you look at with Firefox extensions easy. But it a high price to pay for centering and it's not worth it.
Dec 20 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

34
by: Mark Moore | last post by:
It looks like there's a pretty serious CSS bug in IE6 (v6.0.2800.1106). The HTML below is validated STRICT HTML 4.01 and renders as I would expect in Opera, FrontPage, and Netscape. For some...
9
by: Frances Del Rio | last post by:
when I test my stuff with the validator in HomeSite it tells me the body tag no longer reads margin attributes.. does this mean now margins are to be specified only in CSS? I work for an...
3
by: viza | last post by:
Hi! This: p#p1 { text-align:left; } p#p2 { text-align:center; }
8
by: slim | last post by:
hi again all, i am still working on the website as mentioned in earlier threads and have hit another snag... http://awash.demon.co.uk/index.php http://awash.demon.co.uk/vd.css the php is...
12
by: Secret Guy | last post by:
I'm trying to understand generally how to make a grid of variously sized boxes using CSS. The first idea I had was to make a box where I can see the margin, padding, border and content edges, and...
8
by: Tinus | last post by:
Hello all, Because you have been so helpfull the last couple of times, I thought after testing and wasting more than 20 pages (and google-ling for 3 days :-( ). I would ask you again for your...
0
by: BACON | last post by:
I'm just starting the process of reorganising my modest little website and cleaning up all the HTML, and the logical place to begin was with the homepage. I made a simple little ASP.NET control...
5
by: BACON | last post by:
I'm just starting the process of reorganising my modest little website and cleaning up all the HTML, and the logical place to begin was with the homepage. I made a simple little ASP.NET control...
7
by: Mark | last post by:
Hi, I am creating application in VB 2005. and when I print report it adds extra 0.45 cm margin on left and top, and the reason for this is physical margins of printer. Is it possible to change...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.