in Education by
I've got the following html <!DOCTYPE HTML> Title
  • News
  • Demos
  • home

News

10. April 2011

First News

09. Feb. 2011

Second News

<!-- etc... -->
With the following style: body { background-color:black; text-align:center; margin:50px 0px; padding:0px; font-family: Arial, Helvetica, sans-serif; } #mainframe { width:940px; margin:0px auto; text-align:left; padding:15px; } #content { position: relative; top: 0; background-image:url('hintergrund.jpg'); height:491px; width:800px; overflow:auto; } .news .date { font-weight:bold; float:left; width:150px; } ul { float:right; list-style:none; margin:1px; } img { border:0; } If the content of the content div exceed the 491px height, the it is pushed down under the level of the last menu button. Why does it do so, and how can I correct it? I've tested with Firefox and Safari under MAC OS X. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Your issue seems to be that the ul has 40px of left padding, which is making the remaining space too narrow for the content area. Try adding a rule to the ul to remove the unnecessary padding: ul { padding:0; float: right; list-style: none outside none; margin: 1px; }

Related questions

0 votes
    As I tried to add a video on my top-wrapper previously. (Thank you so much for those who leave ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 9, 2022 in Education by JackTerrance
0 votes
    I have a Div element that pops up when clicking on a icon. This works fine on desktop. But when ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 3, 2022 in Education by JackTerrance
0 votes
    Still learning code. I am building a contact page and wanted to include my header bar at the top ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    Still learning code. I am building a contact page and wanted to include my header bar at the top ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    I am working on a code pen and am having an issue where initially my main element would be exactly ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    How can i wrap data in the table. Currently if template name is too long i get a scroll bar. I ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 19, 2022 in Education by JackTerrance
0 votes
    I want to display the label of an input inside its input, so that when I click the input, the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 3, 2022 in Education by JackTerrance
0 votes
    Why text inside / list is not affected (color of "item1", "item2" is not changed) by CSS applied ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 1, 2022 in Education by JackTerrance
0 votes
    Why text inside / list is not affected (color of "item1", "item2" is not changed) by CSS applied ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 29, 2022 in Education by JackTerrance
0 votes
    Why text inside / list is not affected (color of "item1", "item2" is not changed) by CSS applied ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: Simulating transform-origin using translate (2 answers) Closed 3 years ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: Simulating transform-origin using translate (2 answers) Closed 3 years ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 24, 2022 in Education by JackTerrance
0 votes
    Thanks for helping. I am trying to develop a static carousel (it won't move, but it acts like one) that stretches ... screen (but hidden, so no scrollbar). Here is the markup:...
asked Feb 19, 2022 in Education by JackTerrance
0 votes
    Which Semantic element is best suitable for content like blog post that is self contained, independent and can be republished?...
asked Apr 10, 2021 in Education by JackTerrance
0 votes
    Actually i'm trying to set a table inside a bootstrap card, the issue is that the table width ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 23, 2022 in Education by JackTerrance
...