| | |
Why font-size is affecting the gap between divs in this example?
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Aug 2009
Posts: 35
Reputation:
Solved Threads: 0
As you can see in this test, if you change the font-size in the body section to 0px, it's the only way to bring the divs containing the images together. Could anyone see a solution to this? I can't set the fonts to 0px in the website, and can't understand why is this happening.
I'm testing with Firefox but same is happening in Safari. Haven't tried IE, but it's not really important because I will be using the web only in FF and Safari.
http://localhost/america/editora/test.html
I'm testing with Firefox but same is happening in Safari. Haven't tried IE, but it's not really important because I will be using the web only in FF and Safari.
http://localhost/america/editora/test.html
Last edited by Altairzq; 17 Days Ago at 5:41 pm.
0
#2 17 Days Ago
The code is local to your machine so we would not be able to see the code till you post it...
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
•
•
Join Date: Aug 2009
Posts: 35
Reputation:
Solved Threads: 0
0
#3 17 Days Ago
Ack, sorry about that here is the right link and the code:
http://www.lloparts.com/america/editora/test.html
http://www.lloparts.com/america/editora/test.html
HTML and CSS Syntax (Toggle Plain Text)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es"> <head> <style type="text/css"> body { font-size:13px; } .enlinia { height:8px; width:13px; display:inline; } </style> </head> <body> <div class="enlinia" <IMG SRC="../imatges/botoAmunt.png"></div> <div class="enlinia" <IMG SRC="../imatges/botoAvall.png"></div> <div class="enlinia" <IMG SRC="../imatges/botoEsborrar.png"></div> </body> </html>
Last edited by Altairzq; 17 Days Ago at 9:44 pm.
•
•
Join Date: Jan 2009
Posts: 73
Reputation:
Solved Threads: 10
0
#4 17 Days Ago
Need '>' to your div open tag. And XHTML is case-sensitive and all tags and attributes must be lowercase, and non-close tags need forward slash such as 'img', 'br' or 'hr'. Must be
HTML and CSS Syntax (Toggle Plain Text)
<IMG SRC="../imatges/botoAmunt.png">
HTML and CSS Syntax (Toggle Plain Text)
<img src="../imatges/botoAmunt.png" />
•
•
Join Date: Aug 2009
Posts: 35
Reputation:
Solved Threads: 0
0
#5 16 Days Ago
Thank you Zero13 I fixed and uploaded the code following your directions but the divs still have the gap. I added a border so it can be seen more clearly.
The gap only goes away changing the font-size in the body section to 0px, but this is something I can't do.
The gap only goes away changing the font-size in the body section to 0px, but this is something I can't do.
HTML and CSS Syntax (Toggle Plain Text)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es"> <head> <style type="text/css"> body { font-size:13px; } .enlinia { border:thin solid; height:8px; width:13px; display:inline; } </style> </head> <body> <div class="enlinia"><img src="../imatges/botoAmunt.png" /></div> <div class="enlinia"><img src="../imatges/botoAvall.png" /></div> <div class="enlinia"><img src="../imatges/botoEsborrar.png" /></div> </body> </html>
•
•
Join Date: Jan 2009
Posts: 73
Reputation:
Solved Threads: 10
0
#6 16 Days Ago
The problem is the 'inline' property to your div. I can't explain clearly but changing block element to inline wrap some white space around them. Try to float them appear next to each.
This should work. Thanks for your response.
HTML and CSS Syntax (Toggle Plain Text)
# .enlinia { border:thin solid; height:8px; width:13px; float: left }
•
•
Join Date: Jan 2009
Posts: 73
Reputation:
Solved Threads: 10
1
#7 16 Days Ago
The problem is the 'inline' property to your div. I can't explain clearly but changing block element to inline wrap some white space around them. Try to float them appear next to each.
This should work. Thanks for your response.
HTML and CSS Syntax (Toggle Plain Text)
# .enlinia { border:thin solid; height:8px; width:13px; float: left }
![]() |
Similar Threads
- Issue with font size and displaying area (Pascal and Delphi)
- Change Web Page Font Size on the Fly (Windows tips 'n' tweaks)
- New computer screen question on font size? (Monitors, Displays and Video Cards)
- Help with Font Size In IE (Web Browsers)
- How can I change console application font size? (C)
- Change Font Size (ASP)
Other Threads in the HTML and CSS Forum
- Previous Thread: margin in css
- Next Thread: Shadow
| 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







