Note that there are some explanatory texts on larger screens.

plurals
  1. POdiv in html 5 won't display from css3 file
    primarykey
    data
    text
    <p>I'm creating a web page using html 5 and an external css3 stylesheet.</p> <p>I've created a div to display a rounded corner box. It displays fine when the css div code is in the html document. But as soon as I transfer it to the css3 stylesheet the box disappears. I've been searching for an answer for a couple of hours now and cannot work out whats wrong.</p> <p>Here is my html code...</p> <pre><code>&lt;style type="text/css"&gt; div { border:8px solid #000000; padding:10px 10px; background:#ffffff; width:500px; margin: auto; border-radius:25px; -moz-border-radius:25px; /* Firefox 3.6 and earlier */ } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div&gt;&lt;h1&gt;WELCOME TO THE WEBSITE&lt;/h1&gt;&lt;/div&gt; </code></pre> <p>But as soon as I move this portion </p> <pre><code>div { border:8px solid #000000; padding:10px 10px; background:#ffffff; width:500px; margin: auto; border-radius:25px; -moz-border-radius:25px; /* Firefox 3.6 and earlier */ } </code></pre> <p>over to my css file, and remove from the html file.</p> <p>The div box disappears. All other elements defined in the css file are displaying properly so I know the file is linked. I just don't know why this div won't display.</p> <p>thanks for the reply. The full css code is</p> <pre><code>body { background-image:url(roses.png); background-repeat:repeat top; background-colour:#ffffff; background-attachment:scroll; } h1 { text-shadow: 2px 2px 2px #efefef; } div { border:8px solid #000000; padding:10px 10px; background:#ffffff; width:500px; margin: auto; border-radius:25px; -moz-border-radius:25px; /* Firefox 3.6 and earlier */ } #para1 { text-align:center; color:red; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload