Link to home
Start Free TrialLog in
Avatar of Opeyemi AbdulRasheed
Opeyemi AbdulRasheed

asked on

Bootstrap Notify @media

Experts!

Please how can I adjust the Bootstrap Notify so the width automatically adjusts to the screen size?

See the screenshots.

My own:
User generated image
I want something like this:
User generated image
Thanks
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Opeyemi AbdulRasheed
Opeyemi AbdulRasheed

ASKER

Nice, sir.

That takes care of the center alignment. Now, it takes away background color and font-color.

Now, how do I add class for danger and success alerts?

Thanks sir.
Forgive me.

What's the difference between
type: type + ' my-notify',

Open in new window

and
type: type + 'my-notify',

Open in new window


I edited your code to later so the style disappeared. That's the reason for my earlier comment.
Now, I changed it to your code, it works well.

Please, what's the difference?
The difference is the space.

The type adds the alert classes to the notify to give it its styling (alert alert-danger) if you don't put the space in the class that gets added is
alert alert-dangermy-notify

Open in new window

Instead of
alert alert-danger my-notify

Open in new window

Which is why your styling went screwy.

The above is a hack to insert a class into the BS notify component - as they don't give an option for defining your own class.
Thanks. Clear now