图像板CSS的盒子模型(Box model for a Image board CSS)

你好我和女孩我过去几周一直在使用Image board作为一个学习项目,并且遇到了一些关于CSS样式的问题,主要是我应该如何设计Post及其内容。 我想要构建的东西看起来像这样。

在此处输入图像描述

现在,我这样做的方法是让一个div持有一个img,另一个div使用post_content和一个标题。 并将其设置为Display:flex,row

这样做的一个问题是post / header div会增加容器post div并使文本在屏幕上运行。 我尝试通过给帖子和img固定大小20%/ 80%来解决这个问题。 这很有效,直到我调整页面大小,img和div之间的差距随着我的页面大小而变大。

这里有一个示例帖子,任何帮助都会很棒,而且总是不好回答任何问题。

#flex_content {
  display: flex;
}
#flex_post {
  width: 80%;
}
#post_header {
  margin-bottom: 4px;
}
#thumbnail {
  width: 10em;
  height: auto;
}
#post {
  background-color: #333 !important;
  float: left;
  width: 100%;
}
#post {
  height: auto;
  width: 100%;
  border: 2px solid #F4E8AF;
  margin-top: 5px;
  margin-bottom: 5px;
  padding: 5px;
  word-wrap: break-word;
}
#img {
  width: 20%
}
#post_contnet{
    width:80%;
}
<div id='post'>
  <div id="header">
    <a href="images/1455249371 ">1455249371.png </a>
    <br />
  </div>
  <div id="flex_content">
    <div id="img">
      <img id='thumbnail' src="images/1455249371 ">
    </div>
    <div id='flex_post'>
      <div id="reply_header">
        <b>Anonymous</b> 10:56
        <ahref='chan.php?post=83'>>>No.83</a>
          [<a href='thread.php?thread=67'>Reply</a>]
          <br />
      </div>
      <div id='post_contnet'>
        [Transparent]
        <br />
      </div>
    </div>
  </div>
</div>


Hello guys and girls I Have been working on a Image board as a learning project for the past few week and have run into a bit of a snag with CSS styling mostly in how I should style the Post and it content. What I'm wanting to build would look something like this.

enter image description here

For now the way I'm doing this is by having a div hold a img and another div with the post_content and a header inside of that. and setting it to Display:flex,row

A problem with this would be that the post/header div would out grow the container post div and would make text run off screen. I tried fixing this by giving the post and the img a fixed size 20%/80%. this worked well till i resize the page and the gap between the img and the div grew larger as i size up the page.

here is a sample post any help would be awesome and as always ill be around to answer any questions.

#flex_content {
  display: flex;
}
#flex_post {
  width: 80%;
}
#post_header {
  margin-bottom: 4px;
}
#thumbnail {
  width: 10em;
  height: auto;
}
#post {
  background-color: #333 !important;
  float: left;
  width: 100%;
}
#post {
  height: auto;
  width: 100%;
  border: 2px solid #F4E8AF;
  margin-top: 5px;
  margin-bottom: 5px;
  padding: 5px;
  word-wrap: break-word;
}
#img {
  width: 20%
}
#post_contnet{
    width:80%;
}
<div id='post'>
  <div id="header">
    <a href="images/1455249371 ">1455249371.png </a>
    <br />
  </div>
  <div id="flex_content">
    <div id="img">
      <img id='thumbnail' src="images/1455249371 ">
    </div>
    <div id='flex_post'>
      <div id="reply_header">
        <b>Anonymous</b> 10:56
        <ahref='chan.php?post=83'>>>No.83</a>
          [<a href='thread.php?thread=67'>Reply</a>]
          <br />
      </div>
      <div id='post_contnet'>
        [Transparent]
        <br />
      </div>
    </div>
  </div>
</div>


原文:https://stackoverflow.com/questions/35447000
2023-09-10 13:09

满意答案

尝试使用execution而不是task ,我有startTask相同的问题,但我不知道它是否会与seviceTask


Try to use execution instead task, I had the same problem with startTask, but I'm not sure if it will work with seviceTask

相关问答

更多

获取工作流任务Alfresco的NodeRef(Get NodeRef of a workflow task Alfresco)

遗憾的是,您无法访问存储库中的浏览器信息。 快速而肮脏的解决方案是直接使用页面中已有的信息。 我已经开始工作流程并像您一样打开任务页面。 使用浏览器调试工具,我检查了html。 正如您在下面附带的图像中看到的那样,Alfresco将附加到任务的文档存储在隐藏的输入中。 你可以使用YAHOO来获得它。 搜索ID为“page_x002e_data-form_x002e_task-edit_x0023_default_assoc_packageItems”的元素。 如果关联的文档不止一个,则该值将是逗号...

如何更改sharepoint工作流任务状态?(How to alter sharepoint workflow task status?)

这是对此问题的专家评论: http : //geek.hubkey.com/2007/09/locked-workflow.html 并且,如果您已编辑任务列表中的列,则此链接可能有所帮助: http : //social.msdn.microsoft.com/Forums/en-US/sharepointworkflow/thread/8ec834b6-5408-4079-bdfb-b88d341b36bf/ 希望这可以帮助 here is an expert comment on this p...

无法访问工作流服务任务中的“任务”对象(Not able to access 'task' object in workflow service task)

尝试使用execution而不是task ,我有startTask相同的问题,但我不知道它是否会与seviceTask Try to use execution instead task, I had the same problem with startTask, but I'm not sure if it will work with seviceTask

如何防止在Youtrack工作流程中关闭打开的任务?(How to prevent open task to be closed in Youtrack workflow?)

请注意,无论是在无状态规则的when子句中还是在规则体中,您都可以实现类似State!= null &&!State.isResolved &&(State.oldValue!= null && State.oldValue.isResolved) 要防止更改问题,请使用assert After a lot of working with the code I found the solution: rule check open state when issue.State.becomes({...

工作流设计模式结合任务模式?(Workflow Design pattern combined with Task Pattern?)

除了actor框架之外,我建议使用两种主要的方法来处理普通的旧Java: 使用我们提交任务的ExecutorService。 可以使用Future对象同步正确的步骤顺序。 可以使用下面显示的Phaser来同步整个任务集。 使用Fork / Join框架 以下是使用简单执行程序服务的示例。 Workflow类被赋予执行程序和移相器(同步障碍)。 每次执行工作流程时,它都会为每个步骤(即数据收集,处理和后处理)提交新任务。 每个任务都使用这些相位器来指示它何时开始和停止。 public class W...

如何在sharepoint工作流中显示任务平铺(How to display a Task Tile in sharepoint workflow)

您可以在工作流程中使用“从用户收集数据”操作,您可以创建一些用于从用户获取数据的列,在用户完成此任务后,您的工作流程将转到下一步,您可以在此链接中找到更多详细信息 you can use "Collect data from a user" Action in your workflow , you can create some column for getting data from user and after complete this task by user your workflow...

检查Object是否为Task或Task (Check if Object is Task or Task)

尽管Eric Lippert提到你不应该获取Task.Result,但仍有几个问题要回答: 如何检查对象是否是泛型类型 obj.GetType().IsGenericType 是否是任务<TResult> obj.GetType().GetGenericTypeDefinition() == typeof(Task<>) 如何访问通用属性值 obj.GetType().GetProperty("Result").GetValue(obj) // This value could be null...

从任务<>获取对象(Get object from Task<>)

您正在同步运行异步代码。 你必须在你的方法之前使用await来异步运行你的方法 - 这将处理为你获得任务的结果。 如果同步运行代码,则必须获取任务的结果。 对于异步: public async Task<ActionResult> Accept(string id) { var request = await UpdateRequest(id, RequestOutcome.Accept); if (request!= null) { var c = re...

在没有任务对象的情况下等待所有任务线程(Waiting on All Task Threads without having the Task Object)

我想知道是否有任何方法可以做一种Thread.WaitAll()而没有实际拥有Task对象,因为没有办法得到它们。 不,没有办法可靠地做到这一点。 I would like to know if there is any way to do a sort of Thread.WaitAll() without actually having the Task objects as there's no way to get them. No, there is not a way to do th...

获取当前运行的任务(Get current running Task)

不,没有当前Task概念。 任意运行的任务很多。 甚至“跑步”也没有明确定义。 是new TaskCompletionSource<object>().Task正在运行还是不是? 创建一个可取消的CancellationToken并将其传递给任务以使其自行取消。 将基础CancellationTokenSource传递给要取消的代码。 No, there is no notion of a current Task. There are arbitrarily many tasks running...

相关文章

更多

css盒子模型

盒子模型解决页面的布局问题 块级标签: 占的是一行. 行内标签: 占行内的一部分. 不能嵌套 块级标 ...

编写统一、符合习惯的CSS的原则

以下文档将提供一个合理的风格指导,用于CSS开发。 这个文档并不是规范,我也不希望将自己的风格喜好强加 ...

css常用属性

CSS的基本语法 选择器 { 属性键:属性值; 属性键:属性值1 ...

css选择器使用

标签选择器: 语法: 标签名 { 属性键:属性值; } ...

求教一个 table的css

想要实现这个一个Table,table的padding和下面的黑线一直实现不了,求各位大牛指点。 ...

CSS样式

&lt;table &gt; &lt;tr &gt; &lt;td &gt;&lt;input t ...

按钮样式

网页上有很多功能是通过链接方式传递参数,这种功能链接普通样式就是一个超链接退出,如果将超链接的样式变成 ...

ServletOutputStream cannot be resolved to a type

在使用jsp生成web图片时遇到这个问题,这是源代码中的一条语句,源代码可以执行,可是一将源码放入ec ...

She’s Not Carrying A Handbag

Gao Yuanyuan from after 2005 drama &quot; world fir ...

CSS基础视频教程-尚学堂视频教程

内容包括css基础、css选择器上、css属性、背景、颜色、边框、字体文本文本装饰、列表、css元素分 ...

最新问答

更多

您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)

将diff文件复制到存储库的根目录,然后执行以下操作: git apply yourcoworkers.diff 有关apply命令的更多信息, apply 见其手册页 。 顺便说一下:一个更好的方法是通过文件交换整个提交文件是发送者上的命令git format-patch ,然后在接收器上加上git am ,因为它也传送作者信息和提交信息。 如果修补程序应用程序失败,并且生成diff的提交实际上在您的备份中,则可以使用尝试在更改中合并的apply程序的-3选项。 它还适用于Unix管道,如下

将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)

尝试将第二行更改为snprintf(buf1, sizeof buf1, "%.2f", balance1); 。 另外,为什么要声明用该特定表达式分配缓冲区的存储量? EDIT @LưuVĩnhPhúc在下面的评论中提到我的原始答案中的格式说明符将舍入而不是截断,因此根据如何在不使用C舍入的情况下截断小数,您可以执行以下操作: float balance = 200.56866; int tmp = balance1 * 100; float balance1 = tmp / 100.0; c

OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)

这是简单的解决方案 在你需要写的控制器中 BackendMenu::setContext('Archetypics.Team', 'website', 'team'); 请参阅https://octobercms.com/docs/backend/controllers-views-ajax#navigation-context BackendMenu::setContext('Author.Plugin name', 'Menu code', 'Sub menu code'); 你需要在r

页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)

每当发出请求时ASP都会创建一个新的Page对象,并且一旦它将响应发送回用户就不会保留对该Page对象的引用,因此只要你找不到某种方法来保持生命自己引用该Page对象后,一旦发送响应, Page和只能通过该页面访问的所有对象才有资格进行垃圾回收。 ASP creates a new Page object whenever a request is made, and it does not hold onto the reference to that Page object once it

codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)

要在生产服务器中调试这个,你可以临时放 error_reporting(E_ALL); 并查看有哪些其他错误阻止正确的重定向。 您还应该检查生产服务器发送的响应标头。 它是否具有“缓存”,是否需要重新验证标头等 to debug this in production server, you can temporary put error_reporting(E_ALL); and see what other errors are there that prevents the proper

在计算机拍照在哪里进入

打开娥的电脑.在下面找到视频设备点击进去就可以了...

使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)

你是对的。 第一次输入后,换行符将保留在输入缓冲区中。 第一次读取后尝试插入: cin.ignore(); // to ignore the newline character 或者更好的是: //discards all input in the standard input stream up to and including the first newline. cin.ignore(numeric_limits::max(), '\n'); 您必须为#inc

No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)

for (int k = 0; k > 10; k++) { System.out.println(k); } k不大于10,所以循环将永远不会执行。 我想要什么是k<10 ,不是吗? for (int k = 0; k < 10; k++) { System.out.println(k); } for (int k = 0; k > 10; k++) { System.out.println(k); } k is not greater than 10, so loop

单页应用程序:页面重新加载(Single Page Application: page reload)

优点是不注销会避免惹恼用户,以至于他们会想要杀死你:-)。 说真的,如果每次刷新页面时应用程序都会将我注销(或者在新选项卡中打开一个链接),我再也不会使用该应用程序了。 好吧,不要这样做。 确保身份验证令牌存储在刷新后的某个位置,即不在某些JS变量中,而是存储在cookie或本地存储中。 The advantage is that not logging off will avoid pissing off your users so much that they'll want to kill

在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)

EXECUTE IMMEDIATE 'SELECT '||field_val_temp ||' FROM tableb WHERE function_id = :func_val AND rec_key = :rec_key' INTO field_val USING 'STDCUSAC' , yu.rec_key; 和, EXECUTE IMMEDIATE 'UPDATE tablec SET field_val_'||i||' = :field_val' USI