How we can solve this html problem?

HTML overflow problem?

  • I am trying to create a website which would actually be some kind of quote generator. However I have some problems with html overflow when I resize browser window and don't know how to solve it. To make it easier I took a screenshot, first with full size window (this is how I want it to look like): http://img594.imageshack.us/img594/158/hp1k.png ...and when I resize window: http://img715.imageshack.us/img715/1473/hp2f.png Pictures should move below the text and I can't identify the problem in my code: <html> <head> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>Quote generator</h1><br> <p class="margin big">How do you feel about this quote?<br> <span style="color:black"><script src="quotes.js" type="text/javascript"></script></span> </p> <div style="top: 370; left: 230; position: absolute; visibility: show;"> <span style="cursor:pointer"><a href="ch11.html"><IMG class="margin" SRC="smf.png" height=70 alt="smf.png"></a></span> </div> <div style="top: 370; left: 380; position: absolute; visibility: show;"> <span style="cursor:pointer"><a href="ch11.html"><IMG class="margin" SRC="saf.png" height=70 alt="saf.png"></a></span> </div> </body> </html> and if it's any help I'll paste the CSS code as well: body {background-color:#FFFFFF;} h1 { color:grey; text-align:center; } p { font-family:"Calibri"; font-size:30px; color:rgb(135,132,120); font-weight:bold; position:absolute; left:200px; top:270px; } p.margin { margin-top:10px; margin-bottom:10px; margin-right:0px; margin-left:0px; } img {opacity:0.4; filter:alpha(opacity=40); } img:hover { opacity:1.0; filter:alpha(opacity=100); } img.margin { margin-top:10px; margin-bottom:10px; margin-right:0px; margin-left:0px; } Any kind of help would be greatly appreciated!

  • Answer:

    Controlling an element's overflow problem is done with the CSS rule(s): overflow: auto; overflow: scroll; overflow: hidden; BTW, it's best not to use keywords to make CSS rules. Maybe use: img.m_argin { margin:10px 0; } That covers a 10px top/bottom and zero px left/right. Less coding. There's no need to add " px " to a dimension that is zero in value, i.e., 0px. Ron

Shadow Knows at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

or you could just use min-width on the body tag and prevent the window from being resized below a certain res

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.