Click here to get back home

"Glueing" grapchic with inline text together?

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
"Glueing" grapchic with inline text together? TomB 11-04-2005
Posted by TomB on November 4, 2005, 10:20 am
Please log in for more thread options


Hello,

Let's say I have the following code:

<img src="/path/to/little/decorative/graphic"><a href="/link/path">Link</a>

When I now make my browser window smaller eventually the graphic and the
link text will break into two lines. I don't want that to happen. How to
I accomplish that? I tried putting a non-breaking space between the
image and the link, but perhaps I'm misunderstanding the concept of
&nbsp; since that doesn't solve anything.

Kind regards
TomB

Posted by Jukka K. Korpela on November 4, 2005, 1:40 pm
Please log in for more thread options



> Let's say I have the following code:
>
> <img src="/path/to/little/decorative/graphic"><a href="/link/path">Link</a>

Then first fix it. It's invalid markup.

Before the fix, you could first consider whether you actually have a list of
links, so that the images act as list bullets. Then the logical approach is
to remove the <img> elements, change the list to use <ul> markup, and
consider writing some CSS styling, including list-style-image.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


Posted by TomB on November 4, 2005, 6:52 pm
Please log in for more thread options


Jukka K. Korpela wrote:
>
>
>>Let's say I have the following code:
>>
>><img src="/path/to/little/decorative/graphic"><a href="/link/path">Link</a>
>
>
> Then first fix it. It's invalid markup.

Oops. Got me there.

> Before the fix, you could first consider whether you actually have a list of
> links, so that the images act as list bullets. Then the logical approach is
> to remove the <img> elements, change the list to use <ul> markup, and
> consider writing some CSS styling, including list-style-image.

So it's possible to define your own bullets? Besides that, isn't a list
always displayed vertically? I need them displayed horizontally, unless
the viewport becomes to small.

Here's the actual code:

.navbox { display: block; text-align: center; margin-left: auto;
margin-right: auto; }


<div class="navbox">
<p>
<span class="glue"><img src="img/icon_mini.gif" width="12"
height="13" alt="">&nbsp;<a href="news.php">News</a></span>
<span class="glue"><img src="img/icon_mini.gif" width="12"
height="13" alt="">&nbsp;<a href="bio.php">Biography</a></span>
<span class="glue"><img src="img/icon_mini.gif" width="12"
height="13" alt="">&nbsp;<a href="media.php">Media</a></span>

<span class="glue"><img src="img/icon_mini.gif" width="12"
height="13" alt="">&nbsp;<a href="shows.php">Shows</a></span>
<span class="glue"><img src="img/icon_mini.gif" width="12"
height="13" alt="">&nbsp;<a href="band.php">Band</a></span>
</p>
<p>
<span class="glue"><img src="img/icon_mini.gif" width="12"
height="13" alt="">&nbsp;<a href="releases.php">Releases</a></span>
<span class="glue"><img src="img/icon_mini.gif" width="12"
height="13" alt="">&nbsp;<a href="contact.php">Contact</a></span>
<span class="glue"><img src="img/icon_mini.gif" width="12"
height="13" alt="">&nbsp;<a href="http://dusk-forum.heavymetal.be"
target="_blank">Forum</a></span>

<span class="glue"><img src="img/icon_mini.gif" width="12"
height="13" alt="">&nbsp;<a href="gbook.php">Guestbook</a></span>
<span class="glue"><img src="img/icon_mini.gif" width="12"
height="13" alt="">&nbsp;<a href="links.php">Links</a></span>
</p>
</div>



Greets,
TomB


Posted by Jim Moe on November 4, 2005, 11:37 am
Please log in for more thread options


TomB wrote:
>
> So it's possible to define your own bullets? Besides that, isn't a list
> always displayed vertically? I need them displayed horizontally, unless
> the viewport becomes to small.
>
Visit <http://css.maxdesign.com.au/listamatic/>

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)

Posted by TomB on November 4, 2005, 7:47 pm
Please log in for more thread options


Jim Moe wrote:
> TomB wrote:
>
>>
>> So it's possible to define your own bullets? Besides that, isn't a
>> list always displayed vertically? I need them displayed horizontally,
>> unless the viewport becomes to small.
>>
> Visit <http://css.maxdesign.com.au/listamatic/>
>

O_o

Well, ehm, I'm still learning :-p

Similar ThreadsPosted
Two lines of text in inline context September 1, 2005, 5:40 am
inline frames September 21, 2005, 8:48 pm
inline images December 27, 2005, 2:48 am
CSS gap between inline elements February 7, 2008, 3:03 am
display: inline question? April 26, 2008, 1:11 pm
Restricting inline image size March 29, 2005, 6:56 pm
Re: Restricting inline image size March 29, 2005, 9:24 pm
Re: Restricting inline image size March 30, 2005, 2:07 am
Showing target of a link inline November 15, 2005, 6:00 pm
DTD? Is address element block or inline? December 15, 2005, 10:16 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap