Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old December 1st, 2002, 08:59 PM
madhombre madhombre is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: WI
Posts: 247 madhombre User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
layers - extra padding!

hey there, check out

http://www.hysteriaweb.net/temp/annoying.html

what you have here is a div which has a green border and a red background.

it has a white img on it as the content.

The image is the same size as the width/height of the div.

why does this red line show where there is a space between the bottom of the img and the bottom of the div? when I make the img bigger it resizes the div layer and leaves the red line there. View source, I have set margins and padding to 0px on all sides.

why is it still there????
how can I get rid of it?

thanks

Reply With Quote
  #2  
Old December 2nd, 2002, 05:25 PM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: layers - extra padding!

that is by w3c standard.

try this code:

Code:
<html>
<body>
<div id="content-front" name="content-front" style="
position: absolute; 
left: 82; 
top: 99; 
width: 550; 
height: 300; 
background-color: red; 
border-width: thin; border-style: solid; border-color: #00ff00; 
padding: 0px 0px 0px 0px; 
margin: 0px 0px 0px 0px; 
">

<font size="+3" color=white><img src="http://www.hysteriaweb.net/phpgraphics/crop2.img.php?width=550&height=300">p</font>
</div>	
</body>
</html>


i added font size and color so you can see it better, but it is the same without them.

it is because by default, bottom line of the image is placed at the "base line" of the text. base line is the line that goes here when text is underlined. but text can go below the base line as in letters pqg etc..

that space is there because browser (by w3c recomendation) leaves some space for the text that can go there. i think that this can be changed, but i don't know how. for more info on similar topics, look:

http://devedge.netscape.com/viewsource/2002/almost-standards/

http://devedge.netscape.com/viewsource/2002/img-table/

hope that helps...

Reply With Quote
  #3  
Old December 2nd, 2002, 11:28 PM
brut brut is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 367 brut User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 12 sec
Reputation Power: 3
RE: layers - extra padding!

In your <img> tag you can add either:
style="vertical-align: text-bottom;" (or in global css file as a class)
or
align="absbottom"

Reply With Quote
  #4  
Old December 3rd, 2002, 01:30 AM
madhombre madhombre is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: WI
Posts: 247 madhombre User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: layers - extra padding!

thanks for the info

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > layers - extra padding!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek