473,385 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Note-style box with image

Dan
Hi,
What is the best way to set up a "Note block" on a web page with CSS.
This should consist of a colored box that contains an image on the
left, and left-justified text floating to the right.

Example:
_____________________________
IMAGE |XXXXXXXXXXXXXXXXX
|||||||XXXXXXXXXXXXXXXXX
|||||||XXXXXXXXXXXXXXXXX
_____________________________

| = blank space

May 18 '06 #1
7 3124
On Thu, 18 May 2006 22:10:18 +0200, Dan <te*******@gmail.com> wrote:
What is the best way to set up a "Note block" on a web page with CSS.
This should consist of a colored box that contains an image on the
left, and left-justified text floating to the right.

Example:
_____________________________
IMAGE |XXXXXXXXXXXXXXXXX
|||||||XXXXXXXXXXXXXXXXX
|||||||XXXXXXXXXXXXXXXXX
_____________________________

| = blank space


Google for two column layout css:
<URL:http://www.google.com/search?q=two+column+layout+css>
--
______PretLetters:
| weblog | http://www.pretletters.net/weblog/weblog.html |
| webontwerp | http://www.pretletters.net/html/webontwerp.html |
|zweefvliegen | http://www.pretletters.net/html/vliegen.html |
May 19 '06 #2
To further the education of mankind, "Dan" <te*******@gmail.com>
vouchsafed:
Hi,
What is the best way to set up a "Note block" on a web page with CSS.
This should consist of a colored box that contains an image on the
left, and left-justified text floating to the right.

Example:
_____________________________
IMAGE |XXXXXXXXXXXXXXXXX
|||||||XXXXXXXXXXXXXXXXX
|||||||XXXXXXXXXXXXXXXXX
_____________________________

| = blank space


Um, just text and an image? Put both in <div>, float image left.

--
Neredbojias
Infinity has its limits.
May 19 '06 #3
On Fri, 19 May 2006 02:41:55 -0400, Neredbojias
<http://www.neredbojias.com/fliam.php?cat=alt.html> wrote:
_____________________________
IMAGE |XXXXXXXXXXXXXXXXX
|||||||XXXXXXXXXXXXXXXXX
|||||||XXXXXXXXXXXXXXXXX
_____________________________

| = blank space


Um, just text and an image? Put both in <div>, float image left.


Will this give the OP space under the image ?

--
Steven
May 19 '06 #4
Dan
I tried the following div method. The text wraps under the image. How
can I keep space under the image, and how can I align the text to the
top of the image?

Or should I try creating three divs: one for the image, one for text,
and one to hold the other two?

Or alternatively, would it make since to simply create a div with a
background image of the note image and background color, and put the
text over this image? What are the drawbacks of this method?

What I currently have:
CSS:
#note
{ float: left;
background-color: blue;
margin-top: 2px;
margin-bottom: 2px;
margin-left: 2px;
margin-right: 15px;
}

HTML:
<div id=note><p><img src="note.gif" />Text Text Text Text Text Text
Text</p></div>

May 19 '06 #5
Dan
Thanks to all who replied for your help.

I think I have something that works now. Please let me know of any
potential downsides to this method. One problem I am still dealing with
is that the text has to create enough lines to display the entire
image.

<style type="text/css" title="Stylesheet" media="all">
#note
{
background-image: url(note.gif);
background-color: yellow;
background-repeat: no-repeat;
margin-bottom: 10px;
margin-top: 20px;
padding-left: 105px;
}

..noteText
{
color: blue;
}
</style>
<div id=note><p class=noteText>Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text</span></p>

May 19 '06 #6
To further the education of mankind, Steven Saunderson <ph****@Syd.au>
vouchsafed:
On Fri, 19 May 2006 02:41:55 -0400, Neredbojias
<http://www.neredbojias.com/fliam.php?cat=alt.html> wrote:
> _____________________________
> IMAGE |XXXXXXXXXXXXXXXXX
>|||||||XXXXXXXXXXXXXXXXX
>|||||||XXXXXXXXXXXXXXXXX
> _____________________________
>
> | = blank space


Um, just text and an image? Put both in <div>, float image left.


Will this give the OP space under the image ?


-Space under image?? Didn't know that was desired.

To do that, padding-left and absolute-position image. (Waste of space,
though.)

--
Neredbojias
Infinity has its limits.
May 19 '06 #7
Dan wrote:
Thanks to all who replied for your help.

I think I have something that works now. Please let me know of any
potential downsides to this method. One problem I am still dealing with
is that the text has to create enough lines to display the entire
image.

<style type="text/css" title="Stylesheet" media="all">
#note
{
background-image: url(note.gif);
background-color: yellow;
background-repeat: no-repeat;
margin-bottom: 10px;
margin-top: 20px;
padding-left: 105px;
}

.noteText
{
color: blue;
}
</style>
<div id=note><p class=noteText>Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text</span></p>


Try adding height: XXpx; to #note.

--
Pat
Impeach Bush
http://zzpat.bravehost.com/

Articles of Impeachment
Center for Constitutional Rights
http://zzpat.bravehost.com/april_200...peachment.html
May 21 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: R. Rajesh Jeba Anbiah | last post by:
http://www.php.net/ob_end_clean#33484 Is the note is valid? I have tested in many way, but the result somehow shows that "If-Modified-Since" header is processed by the server than as told in the...
0
by: John Lenton | last post by:
In the fnctl docs for both python 2.3 and 2.4 there is a note at the bottom that says The os.open() function supports locking flags and is available on a wider variety of platforms than the...
6
by: Orchid | last post by:
I have 2 fields with Radio button Data Type, and both fields with more than one options. On Field1, I want the user to select option1, then Field2 is shown and able to select. If the user selects...
1
by: Asbjørn Ulsberg | last post by:
I'm writing a little C# / DirectSound piano which uses SecondaryBuffer to play .wav-files. The SecondaryBuffer has a Frequenzy property which I set to modulate the .wav file into playing the right...
0
by: Patrick Dugan | last post by:
Can anyone point me to an example of reading an Outlook Note to get the text? I want to somehow open a specified note and grab the text within it. I'm using VB.NET for a smart device (in this case...
3
by: Li Pang | last post by:
Hi, I wrote the following codes to read messages. They work fine for Outlook 2002 but fails for 2003. My felling it may be a bug of Outlook 2003. Anybody has experience on that? Thanks in...
3
Shashi Sadasivan
by: Shashi Sadasivan | last post by:
hi, i have an issue with joining some table. i have 3 tables. product - (productID, total) items - (productID, itemNo, total) note - (noteID, productID, note) each product has one or more...
1
by: sudermatt | last post by:
This one is completely baffling. DB Enviornment: MSSQL database Code Environment: ASP / VBscript (obviously) Problem: data from an nText field disappears from conn.execute(sql) recordset. ...
5
by: Slickuser | last post by:
I want to play a note in C# .NET giving a frequency like the one show below. Is it possible? C 261.6 C# 277.2 D 293.7 D# 311.1 E 329.6
3
by: waqasahmed996 | last post by:
Hi, I want to note time when user is logout. I can note time when user login and when logout properly(use button of logout). But if user is not used button and he closed his browser or...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.