Jump to content

w3-css and div alignment


LeonLatex

Recommended Posts

Is it possible to place a w3-css in an external file and not only inline?
What i want to do is align the <div> below 30px from the top. Is there a w3 margin?

<div class="w3-bar w3-card w3-blue-gray w3-margin-bottom w3-padding margin-top: 0px margin-top:30px"></div>

And is it necessary to have both "w3-bar and w3-card"? In my head they are the same with different value/purpose?

w3-***** is the css framework to w3 schools.

Link to comment
Share on other sites

I'm guessing that you are referring to the following:
https://www.w3schools.com/w3css/

If that's the CSS code you are using, note that they provide a couple linking examples on the above page under the "How To" heading. The first example shows how you can link to the stylesheet on the w3schools website.

The second example shows how you can store the CSS code in a separate file on your server. Then use the <link> tag to link to that external CSS file. Of course, you will need to customize the href value so that it points to the proper location on your website.

 

As for your question about margins, you could review the following page:
https://www.w3schools.com/w3css/w3css_margins.asp

...or you could dig through the CSS file itself:
https://www.w3schools.com/w3css/4/w3.css

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.