Jump to content
MARCELO

Responsive division

Recommended Posts

I was building something and between two pairs of text+picture, i decided to make a division using this keyboard key: _  . So i had something like this:

__________________________________________________________________________________________________________________________

 

But in the smartphone, i had this:

_____________________________

_____________________________
______________________________

 

which is not something i wanted to, Is there a way i can present one single line anywhere (laptop, smartphone, etc)?

 

Thanks.

Share this post


Link to post
Share on other sites
  1. Reading about the hr element, i couldn t find out how to specify a color i want for it. It s says  it ¨should render in one solid color (noshaded)¨

But does it mean it can only have one color, even if i try to style it some special way?

 

Thanks.

Share this post


Link to post
Share on other sites

Use CSS to set the border to zero, give it a height of one or two pixels and then give it a background color. CSS lets you style any element in any way, even the <hr> element. The specification only indicates how the browser should style the <hr> element by default when no CSS is applied.

Share this post


Link to post
Share on other sites

Its 'background-color:' notice the hyphen and to centre, it needs to be a display: block; element with margin: 1em auto;

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

×