7 replies [Last post]
ppp
Offline
Regular
Last seen: 17 years 18 weeks ago
Joined: 2004-09-20
Posts: 22
Points: 0

hi i want to have a 'notice' box for special warnings, etc. for an online tutorial

.notice {
	border-width: 1px;
	border-style: solid;
	background-color: #F0F0F0;
	font-weight: bold;
	text-align: center;
	margin: 20px 10px 20px 10px;
	padding: 7px;
}

works nice, but now i want to auto attach a (formatable?) headline like 'SPECIAL NOTICE: EXTREME IMPORTANT STUFF IN THIS BOX!'

would that be possible with css? think so, but dunno.

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 8 years 26 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

Re: NOTICE-Box: Auto attach Notic

ppp wrote:
i want to auto attach a (formatable?) headline

:? :?:

Life's a b*tch and then you die!

ppp
Offline
Regular
Last seen: 17 years 18 weeks ago
Joined: 2004-09-20
Posts: 22
Points: 0

NOTICE-Box: Auto attach Notic

okay i try to circuumscribe my problem... again.

i have a box, just like this (in reality of course it shouldnt be ASCII-art but css formated box Wink )

+------------------------------------------------------------------------+
| NOTICE: THIS INFORMATION IS EXTREME IMPORTANT |
+------------------------------------------------------------------------+

i have severeal of these throughout my page, now i want to have an line auto-attachetd to each box, like:

+------------------------------------------------------------------------+
| information in this box may save your life, so read carefully: |
| NOTICE: THIS INFORMATION IS EXTREME IMPORTANT |
+------------------------------------------------------------------------+

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 8 years 26 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

NOTICE-Box: Auto attach Notic

I'm sorry ppp but I don't know what you mean by 'auto-attach'!

You can use CSS to format text, and you can use CSS to hide or move it, but what do you mean by auto-attach? Be more specific please.

If you mean that you want to do some sort of find-and-replace action with CSS then no you can't; or if you're talking about formatting server-side generated text then you can hide the new line by styling it, but you can't generate text with CSS.

Life's a b*tch and then you die!

Stu
Stu's picture
Offline
Enthusiast
Bristol uk
Last seen: 18 years 6 days ago
Bristol uk
Joined: 2004-01-20
Posts: 282
Points: 0

NOTICE-Box: Auto attach Notic

Unless you use the pseudo class :before or :after but this does not work in IE Sad

It's not what you do it's the way that you do it.
So do it with STYLE
http://www.s7u.co.uk

ppp
Offline
Regular
Last seen: 17 years 18 weeks ago
Joined: 2004-09-20
Posts: 22
Points: 0

NOTICE-Box: Auto attach Notic

@stu: please tell me more, even if it doesnt work in ie (what actually does work in ie, i think by myself sometimes)

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 8 years 26 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

NOTICE-Box: Auto attach Notic

Life's a b*tch and then you die!

lindacoult
Offline
newbie
Last seen: 12 years 32 weeks ago
Joined: 2009-06-11
Posts: 1
Points: 0

I tried this in IE, its

I tried this in IE, its working again, Can you please check again? I tried this in new [url="http://www.iseeq.com/c/web-design.htm"]web design[/url] template and its work fine for me.