Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > CSS > CSS Cascading Style Sheets
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 16th, 2007, 06:03 AM
Registered User
 
Join Date: Feb 2007
Location: , , .
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>


Reply With Quote
  #2 (permalink)  
Old February 18th, 2007, 09:16 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
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
Reply With Quote
  #3 (permalink)  
Old February 19th, 2007, 06:38 AM
Registered User
 
Join Date: Feb 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Matt. <SPAN> has done the trick!

Reply With Quote
  #4 (permalink)  
Old February 19th, 2007, 09:16 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:53 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.