Hello, basically, I'm just learning intermediate CSS and trying to convert
my old table webpage completely to CSS. Hoorah, right? Well, it's not quite
going as planned. It's an extremely simple layout, and I'm finding myself
stuck with small white space in between my images where I planned for the
graphics to be stacked up right on top of one another.
Here's the simple vertical layout: width is 640px, centered with a CSS
border. I'd basically like absolutely no space in between all these
elements.
[logo image (about 300px), centered]
[navbar top image, centered, 7px high] - a horizontal navbar
[navbar link images, 3 of 'em with 2 separator images between, all centered,
45px high]
[navbar bottom bar image, centered, 7px high, identical to top image]
[content, right under that with no space]
[footer]
My main problem is that there's a few seemingly random px worth of white
space in between my navbar lines, each in their own <div>. Even when I
specify a margin: 0; padding: 0; for my images or the <div>, there's still
that space and they are not stacking vertically without the space.
What is a simple way to stack these images on top of one another without
absolute positioning? I'm just learning about absolute and relative
positioning btw.
Thanks 5 12220
Applebrown wrote in
<YRQuc.636673$Ig.371568@pd7tw2no> Hello, basically, I'm just learning intermediate CSS and trying to convert my old table webpage completely to CSS. Hoorah, right? Well, it's not quite going as planned. It's an extremely simple layout, and I'm finding myself stuck with small white space in between my images where I planned for the graphics to be stacked up right on top of one another.
Here's the simple vertical layout: width is 640px, centered with a CSS border. I'd basically like absolutely no space in between all these elements.
[logo image (about 300px), centered] [navbar top image, centered, 7px high] - a horizontal navbar [navbar link images, 3 of 'em with 2 separator images between, all centered, 45px high] [navbar bottom bar image, centered, 7px high, identical to top image] [content, right under that with no space] [footer]
My main problem is that there's a few seemingly random px worth of white space in between my navbar lines, each in their own <div>. Even when I specify a margin: 0; padding: 0; for my images or the <div>, there's still that space and they are not stacking vertically without the space.
What is a simple way to stack these images on top of one another without absolute positioning? I'm just learning about absolute and relative positioning btw.
It's easier with a URL but have you tried removing any line breaks between
images? The break is interpreted as a space by the browser.
<img...><img...> - no white space
<img...>
<img...> - produces a line of white space between the images.
--
PeterMcC
If you feel that any of the above is incorrect,
inappropriate or offensive in any way,
please ignore it and accept my apologies.
Thanks for the response.
I found out later by searching a CSS forum that IE has a default line-height
of 16px. Therefore, each of my 7px high navbars had 9px extra of white
space. When I added:
line-height: 1px;
font-size: 1px;
to the navbar rules, they all matched up perfectly. That's something that I
probably wouldn't have guessed easily...
"PeterMcC" <pe***@mccourt.org.uk> wrote in message
news:40bc4000$0$27217$ed2619ec@ptn-nntp- It's easier with a URL but have you tried removing any line breaks between images? The break is interpreted as a space by the browser.
<img...><img...> - no white space
<img...> <img...> - produces a line of white space between the images.
-- PeterMcC If you feel that any of the above is incorrect, inappropriate or offensive in any way, please ignore it and accept my apologies.
"Applebrown" <ap********@gamebanshee.takethis.andthisout.com> wrote: Thanks for the response.
Not top posting would be the best way to thank the regulars. ;-)
I found out later by searching a CSS forum that IE has a default line-height of 16px.
No it doesn't. IE has a factory default font-size of 16px, the
line-height will be somewhat larger than that (about 18 or 19px).
Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor
Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
"Steve Pugh" <st***@pugh.net> wrote in message
news:4d********************************@4ax.com... "Applebrown" <ap********@gamebanshee.takethis.andthisout.com> wrote:
Thanks for the response. Not top posting would be the best way to thank the regulars. ;-)
Deal. I found out later by searching a CSS forum that IE has a default
line-heightof 16px.
No it doesn't. IE has a factory default font-size of 16px, the line-height will be somewhat larger than that (about 18 or 19px). Steve -- "My theories appal you, my heresies outrage you, I never answer letters and you don't like my tie." - The Doctor
Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
"Applebrown" <ap********@gamebanshee.takethis.andthisout.com> wrote: Not top posting would be the best way to thank the regulars. ;-)
Deal.
Trimming quotes is an essential part of bottom posting.
--
Spartanicus This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Stephen Poley |
last post by:
People in these groups, and on web-pages, not infrequently suggest that
it is worthwhile cutting down on white-space and comments in HTML and
CSS in order to reduce loading times. I and others have...
|
by: Markus Ernst |
last post by:
Hi
I have a strange problem with vertical-align. The case can be viewed at
http://www.brainput.info/geschichte.html.
HTML code:
<div id="bild"><img src="geschichte.gif" width="274"...
|
by: Uncle Pirate |
last post by:
This has me stumped. I am trying to use as little space as possible at
the top of my document but Firefox/Mozilla insists on placing vertical
space before any element. IE displays it correctly...
|
by: Harlan Messinger |
last post by:
What rules deal with attribute values with trailing spaces, or tags or
attribute values with embedded newlines? Examples below: the HREF with
embedded newline, the SRC with trailing spaces, and IMG...
|
by: Nathan Sokalski |
last post by:
I have two asp:ImageMaps in a table cell as follows:
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="center">
<asp:ImageMap ID="mapBanner"...
|
by: dave8421 |
last post by:
Hi,
I have a (strict) html document with the following portion:
<ul>
<li><img alt="" src="images/image1.jpg" /></li>
<li><img alt="" src="images/image2.jpg" /></li>
<li><img alt=""...
|
by: lolo |
last post by:
hello. happy new year.
I'm trying to build a website for my wife and she is adament on having
a horizontal thumbnail scrolling div. great. I have a good vertical
scrolling thing, but can't...
|
by: joeriatscripts |
last post by:
The example: Example. And the code again down this post.
There is a vertical gap (assumable 3px) between the MENU & CONTENT and MENU & HEADER. The layout shows perfectly in IE7 / FF2 etc. Just IE6...
|
by: FairyLucy |
last post by:
Hello web experts, a question form a lonely beginner in HTML and CSS crying out for help!!,
I am trying to stack 5 images of the same dimensions next to each other horizontally as the top bar of...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
|
by: WisdomUfot |
last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
|
by: Carina712 |
last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
|
by: Rahul1995seven |
last post by:
Introduction:
In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
|
by: jack2019x |
last post by:
hello, Is there code or static lib for hook swapchain present?
I wanna hook dxgi swapchain present for dx11 and dx9.
|
by: F22F35 |
last post by:
I am a newbie to Access (most programming for that matter). I need help in creating an Access database that keeps the history of each user in a database. For example, a user might have lesson 1 sent...
| |