rupert160
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by rupert160
-
-
I tried the following code and it worked quite well with a resizing window:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Untitled Document</title><style type="text/css">div.float {float: left} div.float p {text-align: center}</style></head><body><div class="float"> <img class="block" src="http://onlinegames.web-ideas.net.au/images/icons/Casino.jpg" alt="Casino"> <p>caption 1</p></div><div class="float"> <img class="block" src="http://onlinegames.web-ideas.net.au/images/icons/Casino.jpg" alt="Casino"> <p>caption 1</p></div><div class="float"> <img class="block" src="http://onlinegames.web-ideas.net.au/images/icons/Casino.jpg" alt="Casino"> <p>caption 1</p></div><div class="float"> <img class="block" src="http://onlinegames.web-ideas.net.au/images/icons/Casino.jpg" alt="Casino"> <p>caption 1</p></div><div class="float"> <img class="block" src="http://onlinegames.web-ideas.net.au/images/icons/Casino.jpg" alt="Casino"> <p>caption 1</p></div><div class="float"> <img class="block" src="http://onlinegames.web-ideas.net.au/images/icons/Casino.jpg" alt="Casino"> <p>caption 1</p></div><div class="float"> <img class="block" src="http://onlinegames.web-ideas.net.au/images/icons/Casino.jpg" alt="Casino"> <p>caption 1</p></div><div class="float"> <img class="block" src="http://onlinegames.web-ideas.net.au/images/icons/Casino.jpg" alt="Casino"> <p>caption 1</p></div><div class="float"> <img class="block" src="http://onlinegames.web-ideas.net.au/images/icons/Casino.jpg" alt="Casino"> <p>caption 1</p></div><div class="float"> <img class="block" src="http://onlinegames.web-ideas.net.au/images/icons/Casino.jpg" alt="Casino"> <p>caption 1</p></div><div class="float"> <img class="block" src="http://onlinegames.web-ideas.net.au/images/icons/Casino.jpg" alt="Casino"> <p>caption 1</p></div></body></html>
how to center <img> within <div> with float <div>s
in CSS
Posted
hello all,does any body have a good reference to ensure a top centered <img> will float above two floated left and right <div>'s when the window resizes smaller? eg;
The reason is that the image floats under and the div's get control. <img>generally goes under not over. Thanks guys!