Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > CSS > CSS Cascading Style Sheets
|
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 16th, 2007, 06:03 AM
Registered User
 
Join Date: Feb 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default How can I stop <DIV> tag wrapping

Hi,

I am using the <DIV> tag to create a triangle-shaped image. I want this triangle and the text before it to be on the same line. How can I stop this wrapping? See the HTML code that is doing this:

Thanks,
Niq.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
    <title>Untitled</title>
</head>
<body>
<table>
<tr align="center" valign="top">
   <td width="100%" valign="bottom">THE TRIANGLE BELOW NEED TO BE ON THE SAME LINE AS THIS TEXT<div style="border-bottom: 12px solid #006600;border-left: 7px solid #ffffff;border-right:7px solid #ffffff;font-size: 0px; line-height: 0%; width: 0px;"</div></td>
</tr>
</table>
</body>
</html>


 
Old February 18th, 2007, 09:16 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

You have not closed of your opening div tag, Change:
0px;"</div></td>
To
0px;"></div></td>

Why create an arrow this way? It will appear pixelated in the browser and is very browser dependant. Using an image will make your page much more portable not to mention eliminate these issues. However if you must, change your div tag to a span tag.

Wind is your friend
Matt
 
Old February 19th, 2007, 06:38 AM
Registered User
 
Join Date: Feb 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Matt. <SPAN> has done the trick!

 
Old February 19th, 2007, 09:16 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Glad to help :0)

Wind is your friend
Matt





Similar Threads
Thread Thread Starter Forum Replies Last Post
stop writing in Div tag Samikaraeen HTML Code Clinic 2 April 9th, 2006 01:29 AM
Javascript with <div> aware Javascript How-To 3 August 25th, 2005 05:57 AM
hide the <div> crmpicco Javascript How-To 1 August 22nd, 2005 09:43 PM
<style> tags in a <body> vs. <div> bcat BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 March 27th, 2005 08:50 AM
<A><DIV><TABLE></DIV></A> anshul HTML Code Clinic 2 July 17th, 2004 02:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.