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:
Dell PowerEdge Servers
  #1  
Old December 1st, 2002, 07: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: 2
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, 04: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: 3
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, 10: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: < 1 sec
Reputation Power: 2
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, 12: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: 2
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!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

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





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway