| | |
Setting text vertical align to bottom in div tag
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Dec 2007
Posts: 2
Reputation:
Solved Threads: 0
Hi all,
I want to set the text on the right side of image to bottom in a div tag.
depict like below:
______
| img |
| |
|_____| The text is here at the bottom of Image
But after trying some CSS code (using 'vertical-align:bottom'), I always got something like below (there is aways a padding on the bottom, even I set the padding-bottom to zero):
______
| img |
| | The text is here at the bottom of Image
|_____|
Here my code:
Anyone can help me?
I want to set the text on the right side of image to bottom in a div tag.
depict like below:
______
| img |
| |
|_____| The text is here at the bottom of Image
But after trying some CSS code (using 'vertical-align:bottom'), I always got something like below (there is aways a padding on the bottom, even I set the padding-bottom to zero):
______
| img |
| | The text is here at the bottom of Image
|_____|
Here my code:
html Syntax (Toggle Plain Text)
<div class='title'> <div class='date'> <!-- the image is a background of this 'div' --> </div> <h2 id='header2'> The text is here at the bottom of Image </h2> </div> .title { padding:0 0 0 0; vertical-align:bottom; height:56px; } .date { float:left; width:59px; height:56px; overflow:hidden; text-align:center; background: url("someurlHere/icon.jpg") no-repeat; } #header2 { vertical-align:bottom; padding-bottom:0; }
Last edited by peter_budo; Mar 24th, 2008 at 6:00 am. Reason: [icode]is for one line of code, [code] is for multiple lines
•
•
Join Date: Jan 2008
Posts: 79
Reputation:
Solved Threads: 9
•
•
•
•
#header2 {
vertical-align:bottom;
padding-bottom:0;
}
Anyone can help me?
html Syntax (Toggle Plain Text)
#header2 { vertical-align:bottom; padding-bottom:0; float: left; }
Last edited by peter_budo; Mar 24th, 2008 at 6:00 am. Reason: Keep It Organized - please use [code] tags
•
•
Join Date: Jan 2008
Posts: 79
Reputation:
Solved Threads: 9
sorry i didn't see height attribute in your ".title"
try it like this :
try it like this :
HTML and CSS Syntax (Toggle Plain Text)
.title { padding:0 0 0 0; text-align: left; } .date { width:59px; height:56px; overflow:hidden; text-align:center; background: url("someurlHere/icon.jpg") no-repeat; } #header2 { padding:0; margin:0; }
![]() |
Similar Threads
- Open In New Window Php (PHP)
Other Threads in the HTML and CSS Forum
- Previous Thread: spaces between Text and Text box
- Next Thread: Web Design: CSS problem with FF2
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7





