Wrox Programmer Forums
|
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 January 30th, 2007, 04:54 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default text on the same line

I'm trying to put some text on the left hand side of the page and some text on the right within a div tag.

Here is my code and it works...........though it's horrendously messy.

<div id="footerbg" class="clearfix"><a href="#" onClick="javascript:window.open('pop.html?', '_Pop', 'menubar=no,scrollbars=yes,titlebar=no,width=760,h eight=400');">Disclaimer</a> | <a href="#" onClick="javascript:window.open('pop.html?', '_Pop', 'menubar=no,scrollbars=yes,titlebar=no,width=760,h eight=400');">Link</a> | <a href="#" onClick="javascript:window.open('pop.html?', '_Pop', 'menubar=no,scrollbars=yes,titlebar=no,width=760,h eight=400');">Copyright</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Desi gn: <a href="http://www.mysite.co.uk" target="_blank">www.mysite.co.uk</a></div>

Is there a better way to do it?

thanks

 
Old February 11th, 2007, 09:16 PM
Friend of Wrox
 
Join Date: Nov 2005
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ouch sorry to say but that sure does look messy

Here's a tidy way to do that with css
Code:
<style>
/*your style sheet preferably in an external .css file*/
div.leftCol,div.rightCol{
    float:left;
    width:300px;
}
/*firefox fix otherwise the float behaves weird*/
br{
    clear:both;
}
</style>

<div class="leftCol">
<a href="#" onClick="javascript:window.open('pop.html?', '_Pop', 'menubar=no,scrollbars=yes,titlebar=no,width=760,height=400');">            
    Disclaimer
</a> | 
<a href="#" onClick="javascript:window.open('pop.html?', '_Pop', 'menubar=no,scrollbars=yes,titlebar=no,width=760,height=400');">
    Link
</a> | 
<a href="#" onClick="javascript:window.open('pop.html?', '_Pop', 'menubar=no,scrollbars=yes,titlebar=no,width=760,height=400');">    
    Copyright
</a>
</div>


<div class="rightCol">
    Design: <a href="http://www.mysite.co.uk" target="_blank">www.mysite.co.uk</a>
</div>
<br />
__________________________________________________ ________
I am DJ Kat...that's my name. Its a D and a J and a Kat with a K.
 
Old February 19th, 2007, 04:10 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default

thanks Kat, will check it out






Similar Threads
Thread Thread Starter Forum Replies Last Post
extracting multi-line text. Ceromus C# 0 November 7th, 2008 10:06 PM
Line text spacing Adjustment tundewonder Visual Studio 2005 7 July 3rd, 2007 08:18 AM
How to read a line from a text file ? nobitavn94 C# 3 November 25th, 2006 11:04 PM
How to retrieve last selected text line in text bo garetho General .NET 1 May 3rd, 2005 09:17 PM





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