Open Source Tutorials - Open Source Training
Open source training & tutorials from experienced, passionate people
chrome icon firefox icon ie icon opera icon safari icon Sings in these Browsers
A- A A+

By A Web Design

Welcome, Guest
Username Password: Remember me

border around div cuts the images vertically
(1 viewing) (1) Guest
All your queries regarding HTML will be solved in this forum
  • Page:
  • 1
TOPIC:

border around div cuts the images vertically

border around div cuts the images vertically 9 months, 1 week ago #782

  • rajan
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
I want the border to fit the entire way around the text and the image. Currently the border only fits around text and image horizontally and it cuts some of the image vertically. Can anybody solve this?

Code:
<html>
<head>
<s-tyle type="text/css">
#holder{
border: solid 2px black;
width: 760px;
margin: 10px;
padding: 5px;
}

#holder img{
float: right;
}
</style>
</head>
<body>
<div id="holder">
<img alt="sample image" src="images/sample.jpg" />

<p>Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample Text </p>

</div>
</body>
</html>

Re: border around div cuts the images vertically 9 months, 1 week ago #784

  • juber
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
Try this and tell me whether it’s working or not
.holder
{
overflow:hidden;
}
  • Page:
  • 1
Time to create page: 1.61 seconds
OSV Newsletter


Receive HTML?

NOTE: To prevent subscription to the OSV newsletter, uncheck the checkbox above.
Guest Blog for OSV
Free Ebook Download