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 | 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 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
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 30th, 2007, 04:54 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
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

Reply With Quote
  #2 (permalink)  
Old February 11th, 2007, 09:16 PM
Friend of Wrox
 
Join Date: Nov 2005
Location: Rotterdam, , Netherlands.
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.
Reply With Quote
  #3 (permalink)  
Old February 19th, 2007, 04:10 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
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

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
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



All times are GMT -4. The time now is 04:05 AM.


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