Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 07-07-2008, 07:50 AM css img valign
Extreme Talker

Posts: 189
Trades: 0
i cant get my image to valign

HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
    
 <title>Untitled</title>
<style type="text/css">
div.imgwrap{
    margin: 10px;
    padding: 0;
    float: left;
background:url(border.png);
    height:200px;
    width:200px;
    text-align:center;
}

div.img {
margin: 25 auto;
width: 150px;
height: 150px;
}
</style>
</head>

<body>
<div class="imgwrap">
<div class="img">
<img src="photos/tn_1.jpg" />
</div>
</div>
<div class="imgwrap">
<div class="img">
<img src="photos/tn_2.jpg" />
</div>
</div>

</body>
</html>
Attached Images
File Type: jpg site.JPG (15.3 KB, 2 views)
simster is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-07-2008, 09:43 AM Re: css img valign
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
When I want an image to align vertically, I make it into a background image, and position it like this:
HTML Code:
<style>
div#myimage {
background: url(../folder/myimage.jpg) left center no-repeat;
}
</style>
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is online now
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 07-07-2008, 02:59 PM Re: css img valign
Extreme Talker

Posts: 189
Trades: 0
im making a php (maybe with mysql) photo gallery so i that will not work.
simster is offline
Reply With Quote
View Public Profile
 
Old 07-07-2008, 03:07 PM Re: css img valign
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Sure it will, all you need to do is create a .php file with a header in it like this:
PHP Code:
<?php header("Content-type: text/css"); ?>
then link to it as if it were a regular CSS file(as far as the browser is concerned it is). Now, you can have dynamic content in the CSS doc, as well as access to a database. I don't recommend you do this with all of your CSS documents, however, because of caching issues.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is online now
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 07-08-2008, 03:11 AM Re: css img valign
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
vertical-align only applies to inline elements in the same container.

http://www.candsdesign.co.uk/referen...ertical-align/
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to css img valign
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.54491 seconds with 13 queries