Centering in a reset...not sure what to do.

chrishirst

Well-Known Member
Staff member
To centre align any block level element horizontally, you set it to have a width of less than 100% of the parent and set both side margins to auto.
 

Kit_Pantelope

New Member
Noted. When I change the gallery-div to have a width of 99%, it still seems lopsided to the left.

Why?
 

Attachments

  • codepen_gmNLwg (1).zip
    3.7 KB · Views: 1

Kit_Pantelope

New Member
real talk: this makes it really difficult to be a part of this community because you're the main guy here and most newbs post their stuff on codepen and jsfiddle because no newbs are not working with real urls yet.

I don't have a url for you - i've posted the file and the link to the codepen. I'll find another person or place to help me out though.
 

chrishirst

Well-Known Member
Staff member
because no newbs are not working with real urls yet.
Which is one of the basic problems today. No one is EVER going to see the layouts in such a set up, they are going to be looking at it served from a normal web server, which is where one's debugging should be done. there are no problem any more that precludes anyone from grabbing a 'free hosting' package as a temporary test bed. Building a reliance on "tools" that may or may not be available at some future time is self defeating and leads one along a route to dependency rather than real debugging skills.

One can now spend a few dollars on a Raspberry Pi and invest a little time to configure it to run as a web server and you have your own in-house (literally) web server, and if necessary you could forward a port through your home router to allow it to be accessed externally.
 
Top