Jump to content
Mxlt

Problems with a border...help!

Recommended Posts

Hi!

I need some help with an exercise I am doing. In my exercise, the borders on the right side is taking too much space, I would like it to take only as much space as it needs, with only around 2em of padding, but for some reason, the left side and the upper side seems to have a lot of space....I would appreciate a lot if you could help me.

Attached you can find the file and here is a link with the exercise I am doing (the first one).

Exercises

Thank you!

Ejercicio1prueba.htm

Share this post


Link to post
Share on other sites

It is set to 'col-2' class which is 16% of the total width available from the parent div which is same width of body. The text-align: is forcing it to the right as you would expect, the gap at top is the default margin along top and bottom of header element h2. To make it width of text remove 'col-2' class,  or use a smaller width class 'col-1'. if you wish reduce top space adjust padding or adjust margin of h2 element.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×