Note that there are some explanatory texts on larger screens.

plurals
  1. POArranging Elements in CSS according to the size of screen
    primarykey
    data
    text
    <p>I was wondering how would I Arrange the postion of my elements in my CSS like top,left, align, and so on and so forth? take a look at my code</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Avril Lavigne&lt;/title&gt; &lt;link rel = "stylesheet" type = "text/css" href="style/style.css" &lt;/head&gt; &lt;body&gt; &lt;div id = "container"&gt; &lt;div id="banner"&gt;&lt;img src = "images/banner.jpg"/&gt;&lt;/div&gt; &lt;div id = "content"&gt; &lt;div id = "about"&gt; &lt;h1&gt;About Avril Lavigne&lt;/h1&gt; &lt;p&gt; Avril Ramona Lavigne is a Canadian singer-songwriter. She was born in Belleville, Ontario, but spent most of her youth in the small town of Napanee. By the age of 15, she had appeared on stage with Shania Twain; by 16, she had signed a two-album recording contract with Arista Records worth more than $2 million. In 2002, when she was 17 years old, Lavigne broke onto the music scene with her debut album Let Go. &lt;/p&gt; &lt;/div&gt; &lt;div id ="tourdates"&gt; &lt;h2&gt; Tour dates&lt;/h2&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;html&gt; </code></pre> <p>my CSS</p> <pre><code>body{ background-color:#292929; font-size:small; } #container{ padding: 420px; margin:120px; border: 5px dotted pink; } #banner{ top: 150px; left: 450px; right:450px; position:absolute; } #about{ font-size: 100%; font-family: tahoma; color: #8B3A62; position:absolute; top:320px; left: 440px; padding: 20px; width:320px; length: 120px; margin:10px; border: dashed 2px white; } #tourdates{ color: #8B3A62; padding: 20px; top:320px; right: 540px; position:absolute; border: dotted 2px white } </code></pre> <p>The banner is suposed to be at the middle center, and the about should 1/4 or the top left of it(top left below the banner). How would set the sizes of the top, left,side depending on the users screen?</p> <p>My Problem here was when I was at my workspace(my other house) they are well aligned, but when I went to my laptop to continue my work their alignment changed.(my laptop has a smaller screen)</p>
    singulars
    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.
    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